Exemplo n.º 1
0
 /// <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));
 }
Exemplo n.º 2
0
 /// <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));
 }