/// <summary> /// Sets up the channel to spoil the messages (for fault tests) /// </summary> /// <param name="spoiler">Object to process the message.</param> protected void SetBreakingBehaviour(ServiceEndpoint endpoint, MessageSpoiler spoiler) { Binding binding = endpoint.Binding; TestTool.HttpTransport.HttpTransportBindingElement traceElement = (HttpTransport.HttpTransportBindingElement)binding.CreateBindingElements()[1]; if (spoiler != null) { traceElement.Contollers.Add(spoiler); } else { traceElement.Contollers.RemoveAll(c => c is ISoapMessageMutator); } }
protected HttpTransportBindingElement(HttpTransportBindingElement other) : base(other) { _controllers = other._controllers; }
/// <summary> /// Initializes binding elements. /// </summary> void Initialize() { _transport = new HttpTransportBindingElement(_controllers); _encoding = new TextMessageEncodingBindingElement(); }