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; }
public UserFactory(Client client) { this._client = client; }
public ChannelFactory(Client client) { this._client = client; }