public FaultCode(string name, string ns, FaultCode subCode) { if (name == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("name")); } if (name.Length == 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("name")); } if (!string.IsNullOrEmpty(ns)) { NamingHelper.CheckUriParameter(ns, "ns"); } this.name = name; this.ns = ns; this.subCode = subCode; if (ns == "http://www.w3.org/2003/05/soap-envelope") { this.version = EnvelopeVersion.Soap12; } else if (ns == "http://schemas.xmlsoap.org/soap/envelope/") { this.version = EnvelopeVersion.Soap11; } else if (ns == "http://schemas.microsoft.com/ws/2005/05/envelope/none") { this.version = EnvelopeVersion.None; } else { this.version = null; } }
public XmlObjectSerializerHeader(string name, string ns, object objectToSerialize, XmlObjectSerializer serializer, bool mustUnderstand, string actor, bool relay) : this(serializer, mustUnderstand, actor, relay) { if (null == name) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(name)); } if (name.Length == 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR.SFXHeaderNameCannotBeNullOrEmpty, nameof(name))); } if (ns == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(ns)); } if (ns.Length > 0) { NamingHelper.CheckUriParameter(ns, "ns"); } this.objectToSerialize = objectToSerialize; this.name = name; this.ns = ns; }
protected Binding(string name, string ns) { if (string.IsNullOrEmpty(name)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("name", SR.SFXBindingNameCannotBeNullOrEmpty); } if (ns == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("ns"); } if (ns.Length > 0) { NamingHelper.CheckUriParameter(ns, "ns"); } _name = name; _namespaceIdentifier = ns; }
protected Binding(string name, string ns) { this.closeTimeout = ServiceDefaults.CloseTimeout; this.openTimeout = ServiceDefaults.OpenTimeout; this.receiveTimeout = ServiceDefaults.ReceiveTimeout; this.sendTimeout = ServiceDefaults.SendTimeout; if (string.IsNullOrEmpty(name)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("name", System.ServiceModel.SR.GetString("SFXBindingNameCannotBeNullOrEmpty")); } if (ns == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("ns"); } if (ns.Length > 0) { NamingHelper.CheckUriParameter(ns, "ns"); } this.name = name; this.namespaceIdentifier = ns; }
public FaultCode(string name, string ns, FaultCode subCode) { if (name == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(name)); } if (name.Length == 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(name))); } if (!string.IsNullOrEmpty(ns)) { NamingHelper.CheckUriParameter(ns, nameof(ns)); } Name = name; Namespace = ns; SubCode = subCode; if (ns == Message12Strings.Namespace) { _version = EnvelopeVersion.Soap12; } else if (ns == Message11Strings.Namespace) { _version = EnvelopeVersion.Soap11; } else if (ns == MessageStrings.Namespace) { _version = EnvelopeVersion.None; } else { _version = null; } }