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
- ProfileProvider.cs
- CompositeTypefaceMetrics.cs
- TreeSet.cs
- DataViewSetting.cs
- CodeEntryPointMethod.cs
- EditableRegion.cs
- CodeGeneratorAttribute.cs
- StringAnimationBase.cs
- ECDiffieHellman.cs
- MsmqInputSessionChannel.cs
- ExtensionSimplifierMarkupObject.cs
- DbConnectionHelper.cs
- EdmSchemaAttribute.cs
- BindableAttribute.cs
- CustomAttribute.cs
- PersonalizableAttribute.cs
- AssemblyAssociatedContentFileAttribute.cs
- InputScopeAttribute.cs
- Knowncolors.cs
- RadioButton.cs
- ArithmeticLiteral.cs
- XamlInt32CollectionSerializer.cs
- CroppedBitmap.cs
- LinqDataSourceView.cs
- TypeElement.cs
- ExistsInCollection.cs
- OleDbConnectionInternal.cs
- AuthorizationRuleCollection.cs
- MessageQueuePermissionEntry.cs
- FontStyle.cs
- FilteredAttributeCollection.cs
- TraceContext.cs
- DockPanel.cs
- SiteMapPath.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- HotCommands.cs
- ServiceModelEnumValidator.cs
- HttpPostClientProtocol.cs
- OperationCanceledException.cs
- UnsafeNativeMethods.cs
- ChameleonKey.cs
- elementinformation.cs
- _ProxyChain.cs
- MenuEventArgs.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ConfigXmlReader.cs
- SRGSCompiler.cs
- URLIdentityPermission.cs
- DBDataPermissionAttribute.cs
- Misc.cs
- AssertHelper.cs
- RegionInfo.cs
- DependencyObjectType.cs
- PhysicalOps.cs
- WsatServiceAddress.cs
- PageCache.cs
- sqlstateclientmanager.cs
- TextMessageEncoder.cs
- OdbcParameterCollection.cs
- ExpressionBuilderCollection.cs
- SpellerStatusTable.cs
- PointAnimationClockResource.cs
- XPathDocument.cs
- AssemblyBuilder.cs
- SqlConnectionHelper.cs
- MarshalByValueComponent.cs
- HashHelpers.cs
- XmlSchemaFacet.cs
- ListSortDescriptionCollection.cs
- updatecommandorderer.cs
- XmlSchemaCompilationSettings.cs
- FileDialog.cs
- FilterableAttribute.cs
- ToolStripScrollButton.cs
- TraceRecords.cs
- PartialCachingControl.cs
- InputLanguageProfileNotifySink.cs
- EdgeModeValidation.cs
- SQLInt64.cs
- FreezableOperations.cs
- ConnectionInterfaceCollection.cs
- CompositeTypefaceMetrics.cs
- DeriveBytes.cs
- TrustSection.cs
- PropertyTabChangedEvent.cs
- PolicyReader.cs
- ErrorWebPart.cs
- MinMaxParagraphWidth.cs
- XmlNodeReader.cs
- EmptyEnumerable.cs
- EarlyBoundInfo.cs
- WindowsSecurityToken.cs
- XmlnsCompatibleWithAttribute.cs
- XPathParser.cs
- CapabilitiesUse.cs
- FollowerQueueCreator.cs
- InputBinding.cs
- WindowsScroll.cs
- ListView.cs
- InfoCardSymmetricAlgorithm.cs