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
- GroupPartitionExpr.cs
- mediapermission.cs
- HwndStylusInputProvider.cs
- DiagnosticTrace.cs
- FormViewPageEventArgs.cs
- TabControlCancelEvent.cs
- Table.cs
- SizeValueSerializer.cs
- BookmarkCallbackWrapper.cs
- SqlAliasesReferenced.cs
- DataExpression.cs
- ListControlStringCollectionEditor.cs
- GetPageNumberCompletedEventArgs.cs
- Pts.cs
- UndoUnit.cs
- StorageModelBuildProvider.cs
- Italic.cs
- DES.cs
- XmlILConstructAnalyzer.cs
- LabelAutomationPeer.cs
- SocketAddress.cs
- RawMouseInputReport.cs
- DocumentXPathNavigator.cs
- _NtlmClient.cs
- Rect3DConverter.cs
- Util.cs
- XmlQueryCardinality.cs
- TypeSystem.cs
- SqlClientMetaDataCollectionNames.cs
- oledbmetadatacollectionnames.cs
- HttpCapabilitiesBase.cs
- BoolExpression.cs
- WebPartManagerInternals.cs
- ProcessHostFactoryHelper.cs
- OdbcEnvironmentHandle.cs
- HMACSHA384.cs
- MarshalByRefObject.cs
- ProfilePropertySettings.cs
- EditableRegion.cs
- TextEmbeddedObject.cs
- SqlDelegatedTransaction.cs
- JsonXmlDataContract.cs
- Token.cs
- TypeNameConverter.cs
- EntryPointNotFoundException.cs
- EntitySqlQueryCacheEntry.cs
- RefExpr.cs
- SchemaElementLookUpTable.cs
- ClientSideProviderDescription.cs
- VSWCFServiceContractGenerator.cs
- KnownTypes.cs
- TdsParserSafeHandles.cs
- PeerApplicationLaunchInfo.cs
- SHA512Managed.cs
- ValueHandle.cs
- Utils.cs
- FlowDocumentReaderAutomationPeer.cs
- SqlComparer.cs
- StringFunctions.cs
- Function.cs
- MailAddress.cs
- RuleInfoComparer.cs
- Timer.cs
- DataGridViewTopLeftHeaderCell.cs
- SqlBulkCopyColumnMappingCollection.cs
- ListViewDataItem.cs
- EventRecord.cs
- StringDictionaryCodeDomSerializer.cs
- DataTableClearEvent.cs
- MenuItemStyle.cs
- FileRecordSequence.cs
- TextWriter.cs
- SqlDataSourceCache.cs
- HttpHostedTransportConfiguration.cs
- KnownColorTable.cs
- SystemIPv4InterfaceProperties.cs
- DictionaryContent.cs
- DbSetClause.cs
- SerializerWriterEventHandlers.cs
- XmlReflectionMember.cs
- remotingproxy.cs
- SchemaContext.cs
- CachedBitmap.cs
- MetadataItemCollectionFactory.cs
- XmlSchemaImport.cs
- Pointer.cs
- WebEventCodes.cs
- Graphics.cs
- SqlBooleanizer.cs
- DialogResultConverter.cs
- BaseTemplateBuildProvider.cs
- PrimitiveXmlSerializers.cs
- GenericXmlSecurityToken.cs
- PageRequestManager.cs
- ColumnProvider.cs
- FtpCachePolicyElement.cs
- HttpResponse.cs
- OleDbEnumerator.cs
- PanelStyle.cs
- TemplateBaseAction.cs