/// <summary> /// Initializes a new instance of the <see cref="RequestMessage"/> class. /// </summary> /// <param name="correlationId">The correlation id.</param> /// <param name="messageType">Type of the message.</param> /// <param name="messageInvokeMode">The message invoke mode.</param> /// <param name="contract">The contract.</param> /// <param name="methodName">Name of the method.</param> /// <param name="methodParameters">The method parameters.</param> public RequestMessage(String correlationId, MessageTypeEnum messageType, MessageInvokeModeEnum messageInvokeMode, Type contract, String methodName, MethodParameter[] methodParameters) : base(correlationId, messageType) { if (string.IsNullOrEmpty(correlationId)) { ThrowHelper.ThrowArgumentNullException("correlationId"); } if (!(messageType == MessageTypeEnum.Request || messageType == MessageTypeEnum.Datagram || messageType == MessageTypeEnum.DatagramOneway)) { ThrowHelper.ThrowArgumentException(String.Format("Invalid message type parameter: {0}", messageType)); } if (contract == null) { ThrowHelper.ThrowArgumentNullException("contract"); } if (string.IsNullOrEmpty(methodName)) { ThrowHelper.ThrowArgumentNullException("methodName"); } this.mContractName = string.Format("{0}, {1}", contract.FullName, new AssemblyName(contract.Assembly.FullName).Name); this.mMethodName = methodName; this.mMethodParameters = methodParameters; this.mMessageInvokeMode = messageInvokeMode; }
/// <summary> /// Initializes a new instance of the <see cref="RequestMessage"/> class. /// </summary> /// <param name="correlationId">The correlation id.</param> /// <param name="messageType">Type of the message.</param> /// <param name="messageInvokeMode">The message invoke mode.</param> /// <param name="contract">The contract.</param> /// <param name="methodName">Name of the method.</param> public RequestMessage(String correlationId, MessageTypeEnum messageType, MessageInvokeModeEnum messageInvokeMode, Type contract, String methodName) : this(correlationId, messageType, messageInvokeMode, contract, methodName, null) { }
/// <summary> /// Initializes a new instance of the <see cref="RequestMessage"/> class. /// </summary> /// <param name="correlationId">The correlation unique identifier.</param> /// <param name="messageType">Type of the message.</param> /// <param name="messageInvokeMode">The message invoke mode.</param> /// <param name="contract">The contract.</param> /// <param name="methodName">Name of the method.</param> /// <param name="methodParameters">The method parameters.</param> /// <param name="allowParallelExecution">Allow parallel execution on the remote side</param> public RequestMessage(String correlationId, MessageTypeEnum messageType, MessageInvokeModeEnum messageInvokeMode, Type contract, String methodName, MethodParameter[] methodParameters, bool allowParallelExecution) : this(correlationId, messageType, messageInvokeMode, contract, methodName, methodParameters) { AllowParallelExecution = allowParallelExecution; }