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
- XmlEncodedRawTextWriter.cs
- CommandCollectionEditor.cs
- XmlSerializerAssemblyAttribute.cs
- XmlReflectionImporter.cs
- SequenceDesigner.cs
- ChangeDirector.cs
- XPathNavigator.cs
- CheckBoxBaseAdapter.cs
- BindingBase.cs
- NamespaceInfo.cs
- DateTime.cs
- ReadWriteObjectLock.cs
- SystemIPGlobalProperties.cs
- MatrixTransform.cs
- DrawItemEvent.cs
- DataGridRowDetailsEventArgs.cs
- BasicCellRelation.cs
- FileSystemWatcher.cs
- RequestResizeEvent.cs
- ParsedAttributeCollection.cs
- DesignerTransaction.cs
- DataGridLinkButton.cs
- CalloutQueueItem.cs
- Stream.cs
- Form.cs
- SecurityElement.cs
- DrawToolTipEventArgs.cs
- NameSpaceEvent.cs
- WizardPanelChangingEventArgs.cs
- SingleTagSectionHandler.cs
- HtmlInputFile.cs
- ProjectionCamera.cs
- DataGridSortCommandEventArgs.cs
- DefaultBindingPropertyAttribute.cs
- WindowsTokenRoleProvider.cs
- UidManager.cs
- XmlLangPropertyAttribute.cs
- QueuePathDialog.cs
- WebContext.cs
- processwaithandle.cs
- InternalTypeHelper.cs
- RemotingServices.cs
- RelatedPropertyManager.cs
- RoleManagerEventArgs.cs
- MachineKeySection.cs
- TableLayoutCellPaintEventArgs.cs
- ProviderIncompatibleException.cs
- DescendantQuery.cs
- __FastResourceComparer.cs
- ListView.cs
- ConsumerConnectionPoint.cs
- CaseInsensitiveOrdinalStringComparer.cs
- EntityTypeBase.cs
- Converter.cs
- FixedSOMTable.cs
- ExtensibleClassFactory.cs
- CacheChildrenQuery.cs
- Property.cs
- AsymmetricAlgorithm.cs
- CookieProtection.cs
- HttpVersion.cs
- InputBinding.cs
- DbProviderFactoriesConfigurationHandler.cs
- BindingNavigator.cs
- listitem.cs
- base64Transforms.cs
- GeneralTransform3DGroup.cs
- TransactedBatchingBehavior.cs
- SubstitutionList.cs
- ImageListStreamer.cs
- ScaleTransform3D.cs
- EditCommandColumn.cs
- ListMarkerLine.cs
- PathGeometry.cs
- SqlConnectionManager.cs
- DataGridClipboardCellContent.cs
- PartialTrustVisibleAssembly.cs
- ObjectConverter.cs
- StringCollectionEditor.cs
- SchemaSetCompiler.cs
- ContractReference.cs
- TextEditorTables.cs
- FontNamesConverter.cs
- ResXResourceSet.cs
- WebRequestModulesSection.cs
- EntityContainerEmitter.cs
- ActiveXSite.cs
- TransformedBitmap.cs
- ThreadPool.cs
- CreationContext.cs
- Misc.cs
- HeaderElement.cs
- IxmlLineInfo.cs
- ContextBase.cs
- SchemaContext.cs
- NTAccount.cs
- Buffer.cs
- LayoutManager.cs
- RequestSecurityTokenResponse.cs
- ObjectDataSourceSelectingEventArgs.cs