Пример #1
0
        public RegisteredMessage(Client client, Type type)
        {
            this._client = client;

            if (!typeof(IReceiveMessage).IsAssignableFrom(type))
                throw new ArgumentException("type must implement IReceiveMessage", "type");

            MethodInfo minfo = type.GetMethod("CheckMessage", BindingFlags.Public | BindingFlags.Static);
            this._checkMessageDelegate = (Func<ParsedMessage, Client, bool>)Delegate.CreateDelegate(typeof(Func<ParsedMessage, Client, bool>), minfo);

            this.Type = type;
        }
Пример #2
0
 public UserFactory(Client client)
 {
     this._client = client;
 }
Пример #3
0
 public ChannelFactory(Client client)
 {
     this._client = client;
 }