te
This commit is contained in:
parent
01151e679b
commit
57b2f0400e
265 changed files with 22828 additions and 6 deletions
46
Unused/Decal.Adapter/FilterBase.cs
Normal file
46
Unused/Decal.Adapter/FilterBase.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Decal.Adapter.Wrappers;
|
||||
|
||||
namespace Decal.Adapter;
|
||||
|
||||
[CLSCompliant(true)]
|
||||
public abstract class FilterBase : Extension
|
||||
{
|
||||
private NetServiceHost myHost;
|
||||
|
||||
[CLSCompliant(false)]
|
||||
protected NetServiceHost Host => myHost;
|
||||
|
||||
[CLSCompliant(false)]
|
||||
protected event EventHandler<NetworkMessageEventArgs> ServerDispatch;
|
||||
|
||||
[CLSCompliant(false)]
|
||||
protected event EventHandler<NetworkMessageEventArgs> ClientDispatch;
|
||||
|
||||
protected FilterBase()
|
||||
: base(DecalExtensionType.NetworkFilter)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used for internal wiring up of base-class variables.
|
||||
/// Called by FilterProxy
|
||||
/// </summary>
|
||||
/// <param name="newHost">Host (pluginsite) object</param>
|
||||
internal void SetHost(NetServiceHost newHost)
|
||||
{
|
||||
myHost = newHost;
|
||||
}
|
||||
|
||||
internal void fireNetwork(Message newMsg, bool Server)
|
||||
{
|
||||
if (Server && this.ServerDispatch != null)
|
||||
{
|
||||
this.ServerDispatch(this, new NetworkMessageEventArgs(newMsg));
|
||||
}
|
||||
else if (!Server && this.ClientDispatch != null)
|
||||
{
|
||||
this.ClientDispatch(this, new NetworkMessageEventArgs(newMsg));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue