public OperationDescription(string name, ContractDescription declaringContract) { if (name == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(name)); } if (name.Length == 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new ArgumentOutOfRangeException(nameof(name), SR.SFxOperationDescriptionNameCannotBeEmpty)); } XmlName = new XmlName(name, true /*isEncoded*/); _declaringContract = declaringContract ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(declaringContract)); IsInitiating = true; IsTerminating = false; Faults = new FaultDescriptionCollection(); Messages = new MessageDescriptionCollection(); Behaviors = new KeyedByTypeCollection <IOperationBehavior>(); KnownTypes = new Collection <Type>(); }
public OperationDescription(string name, ContractDescription declaringContract) { if (name == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("name"); } if (name.Length == 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new ArgumentOutOfRangeException("name", SR.SFxOperationDescriptionNameCannotBeEmpty)); } _name = new XmlName(name, true /*isEncoded*/); if (declaringContract == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("declaringContract"); } _declaringContract = declaringContract; _isInitiating = true; _faults = new FaultDescriptionCollection(); _messages = new MessageDescriptionCollection(); _behaviors = new KeyedByTypeCollection <IOperationBehavior>(); _knownTypes = new Collection <Type>(); }
public OperationDescription(string name, ContractDescription declaringContract) { this.validateRpcWrapperName = true; if (name == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("name"); } if (name.Length == 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("name", System.ServiceModel.SR.GetString("SFxOperationDescriptionNameCannotBeEmpty"))); } this.name = new System.ServiceModel.Description.XmlName(name, true); if (declaringContract == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("declaringContract"); } this.declaringContract = declaringContract; this.isInitiating = true; this.isTerminating = false; this.faults = new FaultDescriptionCollection(); this.messages = new MessageDescriptionCollection(); this.behaviors = new KeyedByTypeCollection <IOperationBehavior>(); this.knownTypes = new Collection <Type>(); }