Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / CloseSequence.cs / 1 / CloseSequence.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Xml; sealed class CloseSequence : BodyWriter { UniqueId identifier; Int64 lastMsgNumber; public CloseSequence(UniqueId identifier, Int64 lastMsgNumber) : base(true) { this.identifier = identifier; this.lastMsgNumber = lastMsgNumber; } public static CloseSequenceInfo Create(XmlDictionaryReader reader) { if (reader == null) { DiagnosticUtility.DebugAssert("Argument reader cannot be null."); } CloseSequenceInfo closeSequenceInfo = new CloseSequenceInfo(); XmlDictionaryString wsrmNs = WsrmIndex.GetNamespace(ReliableMessagingVersion.WSReliableMessaging11); Wsrm11Dictionary wsrm11Dictionary = DXD.Wsrm11Dictionary; reader.ReadStartElement(wsrm11Dictionary.CloseSequence, wsrmNs); reader.ReadStartElement(XD.WsrmFeb2005Dictionary.Identifier, wsrmNs); closeSequenceInfo.Identifier = reader.ReadContentAsUniqueId(); reader.ReadEndElement(); if (reader.IsStartElement(wsrm11Dictionary.LastMsgNumber, wsrmNs)) { reader.ReadStartElement(); closeSequenceInfo.LastMsgNumber = WsrmUtilities.ReadSequenceNumber(reader, false); reader.ReadEndElement(); } while (reader.IsStartElement()) { reader.Skip(); } reader.ReadEndElement(); return closeSequenceInfo; } protected override void OnWriteBodyContents(XmlDictionaryWriter writer) { XmlDictionaryString wsrmNs = WsrmIndex.GetNamespace(ReliableMessagingVersion.WSReliableMessaging11); Wsrm11Dictionary wsrm11Dictionary = DXD.Wsrm11Dictionary; writer.WriteStartElement(wsrm11Dictionary.CloseSequence, wsrmNs); writer.WriteStartElement(XD.WsrmFeb2005Dictionary.Identifier, wsrmNs); writer.WriteValue(this.identifier); writer.WriteEndElement(); if (this.lastMsgNumber > 0) { writer.WriteStartElement(wsrm11Dictionary.LastMsgNumber, wsrmNs); writer.WriteValue(this.lastMsgNumber); writer.WriteEndElement(); } writer.WriteEndElement(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AssociationSetEnd.cs
- ProcessManager.cs
- DetailsViewPageEventArgs.cs
- ToolBarPanel.cs
- Error.cs
- ConnectionStringSettingsCollection.cs
- XsdValidatingReader.cs
- DataKey.cs
- ExtendedProperty.cs
- HScrollProperties.cs
- ReliableChannelFactory.cs
- Error.cs
- TextViewSelectionProcessor.cs
- MemberRestriction.cs
- ResourceWriter.cs
- TreeViewEvent.cs
- TextAutomationPeer.cs
- SafeThemeHandle.cs
- shaper.cs
- AnnotationHelper.cs
- MessageLoggingElement.cs
- FixedTextPointer.cs
- StylusPointDescription.cs
- CodeGeneratorOptions.cs
- WhitespaceReader.cs
- ObjectStateEntry.cs
- Hex.cs
- PathSegment.cs
- AppearanceEditorPart.cs
- NativeMethods.cs
- RuntimeWrappedException.cs
- DocumentPageView.cs
- ButtonColumn.cs
- ExplicitDiscriminatorMap.cs
- XpsDocument.cs
- FocusTracker.cs
- Msec.cs
- HandoffBehavior.cs
- SpeakInfo.cs
- UpdateRecord.cs
- ToolStripSplitButton.cs
- SystemPens.cs
- SqlResolver.cs
- ListViewTableCell.cs
- ColorBuilder.cs
- ControlPager.cs
- Pens.cs
- DeferredReference.cs
- HandlerFactoryWrapper.cs
- FrameworkElementAutomationPeer.cs
- QuotedPrintableStream.cs
- HtmlInputFile.cs
- HtmlProps.cs
- TreeViewTemplateSelector.cs
- RSAPKCS1SignatureDeformatter.cs
- StylusPointProperty.cs
- ReadOnlyDictionary.cs
- TableHeaderCell.cs
- IndexExpression.cs
- SecurityUtils.cs
- SoapSchemaExporter.cs
- X509RawDataKeyIdentifierClause.cs
- AsyncCompletedEventArgs.cs
- ControlCachePolicy.cs
- ProcessModelInfo.cs
- WebPartMinimizeVerb.cs
- SqlRemoveConstantOrderBy.cs
- DocumentEventArgs.cs
- DisplayInformation.cs
- XpsS0ValidatingLoader.cs
- FileInfo.cs
- ResourceWriter.cs
- CollectionBuilder.cs
- OdbcCommandBuilder.cs
- EdgeProfileValidation.cs
- ArraySubsetEnumerator.cs
- SqlConnectionPoolProviderInfo.cs
- BaseConfigurationRecord.cs
- PhoneCallDesigner.cs
- ConsumerConnectionPoint.cs
- TypeToken.cs
- Socket.cs
- TextComposition.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- SQLMoney.cs
- TypeConverters.cs
- ProtectedConfigurationSection.cs
- Soap12ProtocolReflector.cs
- DecoderReplacementFallback.cs
- BindingNavigator.cs
- ProgressBar.cs
- FileDialog_Vista.cs
- GlobalItem.cs
- WebPartConnectVerb.cs
- Symbol.cs
- SQLInt16Storage.cs
- InProcStateClientManager.cs
- ColorAnimation.cs
- AnonymousIdentificationModule.cs
- oledbconnectionstring.cs