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
- StringAttributeCollection.cs
- IBuiltInEvidence.cs
- TableChangeProcessor.cs
- ProfileServiceManager.cs
- TogglePattern.cs
- XPathExpr.cs
- GeometryDrawing.cs
- Base64Encoder.cs
- TextEffect.cs
- DbConnectionClosed.cs
- WaveHeader.cs
- Pen.cs
- MethodImplAttribute.cs
- UTF32Encoding.cs
- EntityDataSourceViewSchema.cs
- ExpressionVisitor.cs
- CacheSection.cs
- CompositeActivityTypeDescriptor.cs
- PermissionListSet.cs
- RuleSettingsCollection.cs
- ScriptRegistrationManager.cs
- ValidatedControlConverter.cs
- CheckoutException.cs
- ToolStripItemCollection.cs
- ObservableCollectionDefaultValueFactory.cs
- BaseDataList.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SqlDelegatedTransaction.cs
- MenuAdapter.cs
- TraceInternal.cs
- WorkflowPageSetupDialog.cs
- AsyncOperation.cs
- SqlReferenceCollection.cs
- EmbeddedMailObject.cs
- WebPartZone.cs
- FilePrompt.cs
- EntityDataSourceContextCreatingEventArgs.cs
- LinqDataSourceValidationException.cs
- TextEditorSpelling.cs
- AsnEncodedData.cs
- Trace.cs
- XPathParser.cs
- IdleTimeoutMonitor.cs
- AssemblyBuilderData.cs
- WebFormDesignerActionService.cs
- Memoizer.cs
- SettingsAttributeDictionary.cs
- BuilderPropertyEntry.cs
- InvalidFilterCriteriaException.cs
- KnownColorTable.cs
- BorderGapMaskConverter.cs
- DataGridDesigner.cs
- EntryPointNotFoundException.cs
- RecordManager.cs
- DynamicObject.cs
- httpserverutility.cs
- XmlLanguageConverter.cs
- ReaderContextStackData.cs
- XmlSerializer.cs
- DbConnectionPool.cs
- XmlConverter.cs
- ComponentRenameEvent.cs
- ValidationManager.cs
- BaseCollection.cs
- TabControlEvent.cs
- Hyperlink.cs
- EditingScopeUndoUnit.cs
- EdgeModeValidation.cs
- AuthenticationSchemesHelper.cs
- Int32Animation.cs
- DesignerCategoryAttribute.cs
- ResponseStream.cs
- PageContentCollection.cs
- WinCategoryAttribute.cs
- NeutralResourcesLanguageAttribute.cs
- DataRowChangeEvent.cs
- CacheForPrimitiveTypes.cs
- HwndHost.cs
- OlePropertyStructs.cs
- SqlAggregateChecker.cs
- PrintControllerWithStatusDialog.cs
- SvcFileManager.cs
- SqlConnectionFactory.cs
- DataStreamFromComStream.cs
- GridSplitterAutomationPeer.cs
- SqlWebEventProvider.cs
- ObjectIDGenerator.cs
- TextAnchor.cs
- PropertyDescriptorCollection.cs
- HostedImpersonationContext.cs
- DateTimeUtil.cs
- PolyQuadraticBezierSegment.cs
- Size3D.cs
- DragDrop.cs
- TextLineResult.cs
- QfeChecker.cs
- InternalConfigRoot.cs
- CustomAttributeFormatException.cs
- ConfigXmlText.cs
- XmlFormatWriterGenerator.cs