public OperationFormatter(OperationDescription description, bool isRpc, bool isEncoded) { Validate(description, isRpc, isEncoded); _requestDescription = description.Messages[0]; if (description.Messages.Count == 2) { _replyDescription = description.Messages[1]; } int stringCount = 3 + _requestDescription.Body.Parts.Count; if (_replyDescription != null) { stringCount += 2 + _replyDescription.Body.Parts.Count; } _dictionary = new XmlDictionary(stringCount * 2); GetActions(description, _dictionary, out _action, out _replyAction); _operationName = description.Name; requestStreamFormatter = StreamFormatter.Create(_requestDescription, _operationName, true /*isRequest*/); if (_replyDescription != null) { replyStreamFormatter = StreamFormatter.Create(_replyDescription, _operationName, false /*isResponse*/); } }
public OperationFormatter(OperationDescription description, bool isRpc, bool isEncoded) { Validate(description, isRpc, isEncoded); this.requestDescription = description.Messages[0]; if (description.Messages.Count == 2) { this.replyDescription = description.Messages[1]; } int num = 3 + this.requestDescription.Body.Parts.Count; if (this.replyDescription != null) { num += 2 + this.replyDescription.Body.Parts.Count; } this.dictionary = new XmlDictionary(num * 2); GetActions(description, this.dictionary, out this.action, out this.replyAction); this.operationName = description.Name; this.requestStreamFormatter = StreamFormatter.Create(this.requestDescription, this.operationName, true); if (this.replyDescription != null) { this.replyStreamFormatter = StreamFormatter.Create(this.replyDescription, this.operationName, false); } }