public Method(MethodType methodType, Endpoint endpoint, Action action) { if (action == null) { throw new ArgumentNullException("action", "action cannot be null."); } this.Initialize(methodType, endpoint); this.action = action; }
public Method(MethodType methodType, Endpoint endpoint, Action<IRequestMessage, IResponseMessage> action) { if (action == null) { throw new ArgumentNullException("action", "action cannot be null."); } this.Initialize(methodType, endpoint); this.requestResponseAction = action; }
protected void Initialize(MethodType methodType, Endpoint endpoint) { if (endpoint == null) { throw new ArgumentNullException("endpoint", "endpoint cannot be null."); } this.MethodType = methodType; this.Endpoint = endpoint; this.Pipeline = new Pipeline(); }