Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Activation / ListenerChannelContext.cs / 1 / ListenerChannelContext.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Activation { using System; using System.IO; using System.Runtime.Serialization; using System.Net.Sockets; using System.ServiceModel.Dispatcher; [DataContract] class ListenerChannelContext { [DataMember] string appKey; [DataMember] int listenerChannelId; [DataMember] Guid token; internal ListenerChannelContext(string appKey, int listenerChannelId, Guid token) { this.appKey = appKey; this.listenerChannelId = listenerChannelId; this.token = token; } internal string AppKey { get { return appKey; } } internal int ListenerChannelId { get { return listenerChannelId; } } internal Guid Token { get { return token; } } public static ListenerChannelContext Hydrate(byte[] blob) { using (MemoryStream memoryStream = new MemoryStream(blob)) { DataContractSerializer serializer = new DataContractSerializer(typeof(ListenerChannelContext)); return (ListenerChannelContext)serializer.ReadObject(memoryStream); } } public byte[] Dehydrate() { using (MemoryStream memoryStream = new MemoryStream()) { DataContractSerializer serializer = new DataContractSerializer(typeof(ListenerChannelContext)); serializer.WriteObject(memoryStream, this); return memoryStream.ToArray(); } } } } // 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
- BamlResourceSerializer.cs
- ValidationHelper.cs
- ViewBox.cs
- TemplateParser.cs
- XmlSchema.cs
- LinqDataSource.cs
- UrlMappingsSection.cs
- XmlSerializerNamespaces.cs
- WebPartCatalogCloseVerb.cs
- ListenerConnectionDemuxer.cs
- MessageQueuePermission.cs
- CurrentChangingEventArgs.cs
- hebrewshape.cs
- MSG.cs
- CustomErrorsSectionWrapper.cs
- Cursors.cs
- AngleUtil.cs
- ECDiffieHellmanPublicKey.cs
- ObjectDataSourceDisposingEventArgs.cs
- XmlSchemaObjectCollection.cs
- RegistryPermission.cs
- MachineSettingsSection.cs
- StoreAnnotationsMap.cs
- ConstraintStruct.cs
- FixedTextSelectionProcessor.cs
- DtdParser.cs
- UrlPath.cs
- Line.cs
- ReleaseInstanceMode.cs
- ListenerAdapter.cs
- wmiprovider.cs
- X509ServiceCertificateAuthenticationElement.cs
- followingsibling.cs
- AppDomainShutdownMonitor.cs
- SocketAddress.cs
- LogRecordSequence.cs
- XmlnsDefinitionAttribute.cs
- DelegatingHeader.cs
- PageContentAsyncResult.cs
- OletxResourceManager.cs
- RawStylusSystemGestureInputReport.cs
- MimeObjectFactory.cs
- AssemblyNameEqualityComparer.cs
- MenuItemStyleCollection.cs
- DocumentOrderComparer.cs
- SamlAssertion.cs
- OperationAbortedException.cs
- ForwardPositionQuery.cs
- BufferedGraphics.cs
- MultiSelector.cs
- Label.cs
- Imaging.cs
- ProjectionPruner.cs
- TableAutomationPeer.cs
- WeakKeyDictionary.cs
- ObjectQueryState.cs
- IdlingCommunicationPool.cs
- RC2.cs
- WebPartConnectionsConfigureVerb.cs
- BooleanAnimationUsingKeyFrames.cs
- Brushes.cs
- Int16.cs
- MailWebEventProvider.cs
- InputBuffer.cs
- CodeThrowExceptionStatement.cs
- safelink.cs
- RichTextBoxContextMenu.cs
- EditorZoneAutoFormat.cs
- ExpressionLink.cs
- ExpressionNormalizer.cs
- Schema.cs
- ScriptBehaviorDescriptor.cs
- VSWCFServiceContractGenerator.cs
- Tuple.cs
- CharacterString.cs
- EnumUnknown.cs
- EntitySqlQueryState.cs
- MultiByteCodec.cs
- WebPartCatalogCloseVerb.cs
- RenderingEventArgs.cs
- MethodCallTranslator.cs
- TabPage.cs
- TextSchema.cs
- LinearKeyFrames.cs
- MimeBasePart.cs
- ExceptionUtil.cs
- CompiledAction.cs
- IISUnsafeMethods.cs
- ComponentDispatcher.cs
- ViewStateModeByIdAttribute.cs
- WSSecurityPolicy.cs
- WebMessageEncoderFactory.cs
- Mutex.cs
- ServiceDebugBehavior.cs
- XdrBuilder.cs
- HuffmanTree.cs
- CngKeyCreationParameters.cs
- __ConsoleStream.cs
- XmlNavigatorFilter.cs
- WizardPanelChangingEventArgs.cs