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
- CodeArrayIndexerExpression.cs
- DoubleConverter.cs
- IIS7UserPrincipal.cs
- SystemResources.cs
- PriorityBinding.cs
- UidManager.cs
- EntityModelBuildProvider.cs
- ClientConfigurationHost.cs
- MimeMapping.cs
- SHA512Managed.cs
- NetPeerTcpBinding.cs
- ScriptReferenceBase.cs
- NavigationPropertyEmitter.cs
- XmlSchemaSimpleTypeUnion.cs
- ClipboardProcessor.cs
- PreservationFileWriter.cs
- NTAccount.cs
- VectorValueSerializer.cs
- LicenseProviderAttribute.cs
- DoubleLinkList.cs
- ProgressBar.cs
- MiniMapControl.xaml.cs
- PropertyTab.cs
- SizeLimitedCache.cs
- TableAutomationPeer.cs
- ServicesUtilities.cs
- SecurityPolicySection.cs
- ButtonAutomationPeer.cs
- DataViewSetting.cs
- VectorCollection.cs
- ExpanderAutomationPeer.cs
- TagNameToTypeMapper.cs
- PtsHost.cs
- ColumnBinding.cs
- FunctionImportElement.cs
- TransformationRules.cs
- DispatcherSynchronizationContext.cs
- wgx_render.cs
- MailAddressCollection.cs
- RadioButtonBaseAdapter.cs
- DetailsViewUpdatedEventArgs.cs
- XPathArrayIterator.cs
- UnknownBitmapDecoder.cs
- StringFormat.cs
- Delay.cs
- DragEvent.cs
- ProcessModule.cs
- OptimalTextSource.cs
- CachedFontFamily.cs
- MetadataUtilsSmi.cs
- HostedElements.cs
- ServicePointManagerElement.cs
- KeyInfo.cs
- WebBrowser.cs
- ManagementNamedValueCollection.cs
- CompiledIdentityConstraint.cs
- HtmlWindowCollection.cs
- ZipPackage.cs
- Figure.cs
- DragDropManager.cs
- RawAppCommandInputReport.cs
- MenuAdapter.cs
- OAVariantLib.cs
- typedescriptorpermissionattribute.cs
- ApplicationSecurityManager.cs
- SafeNativeMethods.cs
- NavigatorInput.cs
- Msmq3PoisonHandler.cs
- UshortList2.cs
- Scheduling.cs
- ZipIOLocalFileDataDescriptor.cs
- DocumentPaginator.cs
- BitStack.cs
- ConfigurationSchemaErrors.cs
- CanonicalFontFamilyReference.cs
- HtmlHead.cs
- TrustSection.cs
- BindingMemberInfo.cs
- ColorTransform.cs
- RelationshipNavigation.cs
- DllNotFoundException.cs
- DataDocumentXPathNavigator.cs
- FormConverter.cs
- ArgIterator.cs
- TemplateBuilder.cs
- EventRouteFactory.cs
- ActivityExecutorDelegateInfo.cs
- SqlProviderServices.cs
- DataTable.cs
- Model3DGroup.cs
- QuaternionValueSerializer.cs
- SystemNetHelpers.cs
- DocumentScope.cs
- AsymmetricKeyExchangeFormatter.cs
- ConfigXmlAttribute.cs
- FloaterParagraph.cs
- ParseChildrenAsPropertiesAttribute.cs
- Ray3DHitTestResult.cs
- XPathNodeList.cs
- PointCollectionConverter.cs