public ContractDescription(string name, string ns) { this.behaviors = new KeyedByTypeCollection <IContractBehavior>(); this.Name = name; if (!string.IsNullOrEmpty(ns)) { NamingHelper.CheckUriParameter(ns, "ns"); } this.operations = new OperationDescriptionCollection(); this.ns = ns ?? "http://tempuri.org/"; }
public ContractDescription(string name, string ns) { // the property setter validates given value this.Name = name; if (!string.IsNullOrEmpty(ns)) { NamingHelper.CheckUriParameter(ns, "ns"); } _operations = new OperationDescriptionCollection(); _ns = ns ?? NamingHelper.DefaultNamespace; // ns can be "" }
public ContractDescription(string name, string ns) { if (name == null) { throw new ArgumentNullException("name"); } if (name.Length == 0) { throw new ArgumentOutOfRangeException("ContractDescription's Name must be a non-empty string."); } if (ns == null) { ns = "http://tempuri.org/"; } this.name = name; this.ns = ns; behaviors = new KeyedByTypeCollection <IContractBehavior> (); operations = new OperationDescriptionCollection(); }