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
- BinaryExpression.cs
- PartitionResolver.cs
- OwnerDrawPropertyBag.cs
- _NTAuthentication.cs
- GridPattern.cs
- Set.cs
- OleDbCommandBuilder.cs
- CookieProtection.cs
- SessionPageStatePersister.cs
- Query.cs
- ObjectViewQueryResultData.cs
- TableStyle.cs
- DataStorage.cs
- FontUnitConverter.cs
- XmlHierarchicalDataSourceView.cs
- PrivateFontCollection.cs
- FileFormatException.cs
- OdbcFactory.cs
- FilterElement.cs
- ContentFilePart.cs
- ScriptResourceHandler.cs
- IIS7ConfigurationLoader.cs
- RootAction.cs
- PathSegmentCollection.cs
- FunctionNode.cs
- LocalizableResourceBuilder.cs
- XmlSchemaImporter.cs
- Decoder.cs
- InkCanvas.cs
- StsCommunicationException.cs
- CompilationUnit.cs
- MetadataSerializer.cs
- IInstanceContextProvider.cs
- ChangePassword.cs
- DelayedRegex.cs
- SoapSchemaMember.cs
- CancellationTokenSource.cs
- SchemaNames.cs
- KoreanLunisolarCalendar.cs
- ArrayConverter.cs
- Visitor.cs
- WindowsComboBox.cs
- MetadataCollection.cs
- RequestQueue.cs
- SchemaTableColumn.cs
- AssociativeAggregationOperator.cs
- NativeMethods.cs
- Attributes.cs
- DataGridViewRowsRemovedEventArgs.cs
- WorkflowRequestContext.cs
- DeferredReference.cs
- ListViewInsertionMark.cs
- DataIdProcessor.cs
- CodeDomLocalizationProvider.cs
- HttpModuleAction.cs
- RemoteHelper.cs
- RelationshipConstraintValidator.cs
- GeneralTransform2DTo3DTo2D.cs
- InitializerFacet.cs
- XmlSortKey.cs
- DataServiceStreamProviderWrapper.cs
- DoubleUtil.cs
- StandardCommands.cs
- WebConfigurationHost.cs
- AnonymousIdentificationSection.cs
- HostedHttpContext.cs
- XmlIncludeAttribute.cs
- FlowNode.cs
- EllipseGeometry.cs
- ListViewItemMouseHoverEvent.cs
- Converter.cs
- SqlUserDefinedTypeAttribute.cs
- HwndPanningFeedback.cs
- DateTimeSerializationSection.cs
- figurelengthconverter.cs
- StringToken.cs
- UidManager.cs
- MemberHolder.cs
- CodeTypeReferenceCollection.cs
- QueryCacheKey.cs
- MenuItemBindingCollection.cs
- TextBox.cs
- RegexParser.cs
- BasicExpandProvider.cs
- ObjectSet.cs
- ThreadSafeList.cs
- HtmlTable.cs
- Rules.cs
- XsdDateTime.cs
- ContentControl.cs
- StringHandle.cs
- SchemaName.cs
- Int32AnimationBase.cs
- MasterPageBuildProvider.cs
- PageCache.cs
- CategoryNameCollection.cs
- HighlightOverlayGlyph.cs
- PublishLicense.cs
- HtmlUtf8RawTextWriter.cs
- DataTransferEventArgs.cs