/// <summary> /// Initialises a new instance of the <see cref="MessageTypeAttribute"/> class. /// </summary> /// <param name="messageType">The message type.</param> /// <param name="delegateType">The delegate type.</param> /// <param name="delegateName">The name of the delegate.</param> public MessageTypeAttribute(MessageType messageType, Type delegateType, string delegateName) { this.messageType = messageType; this.outputAction = (ReplyDelegates.ReplyDelegate)Delegate.CreateDelegate(typeof(ReplyDelegates.ReplyDelegate), delegateType.GetMethod(delegateName)); }
/// <summary> /// Initialises a new instance of the <see cref="MessageTypeAttribute"/> class. /// </summary> /// <param name="messageType">The message type.</param> /// <param name="delegateType">The delegate type.</param> /// <param name="delegateName">The name of the delegate.</param> public MessageTypeAttribute(MessageType messageType, Type delegateType, string delegateName) { this.messageType = messageType; this.outputAction = (ReplyDelegates.ReplyDelegate)Delegate.CreateDelegate(typeof(ReplyDelegates.ReplyDelegate), delegateType.GetMethod(delegateName)); }