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
- ProtectedConfiguration.cs
- ButtonChrome.cs
- ServiceOperation.cs
- WinEventQueueItem.cs
- UnicastIPAddressInformationCollection.cs
- Transform3DGroup.cs
- LeaseManager.cs
- CustomAttribute.cs
- ReadOnlyHierarchicalDataSourceView.cs
- BlurEffect.cs
- ImageSource.cs
- ClientSideProviderDescription.cs
- HtmlTableRow.cs
- InputBinding.cs
- XamlWriter.cs
- ToolStripSeparator.cs
- DataContract.cs
- TraceShell.cs
- CryptoStream.cs
- PointLight.cs
- HwndAppCommandInputProvider.cs
- BoundingRectTracker.cs
- ArglessEventHandlerProxy.cs
- ObjectDisposedException.cs
- DesignerActionService.cs
- InputScopeNameConverter.cs
- Walker.cs
- SqlVersion.cs
- DataGridItemEventArgs.cs
- PreviewPageInfo.cs
- DataTemplateSelector.cs
- Command.cs
- ContentTextAutomationPeer.cs
- SortDescriptionCollection.cs
- DBNull.cs
- DocumentGrid.cs
- InstancePersistenceException.cs
- ContractComponent.cs
- XmlSchemaChoice.cs
- FormatVersion.cs
- StrongNameIdentityPermission.cs
- HMAC.cs
- CalendarItem.cs
- PathFigureCollectionValueSerializer.cs
- WindowPatternIdentifiers.cs
- StorageMappingItemCollection.cs
- HexParser.cs
- recordstatefactory.cs
- SynchronizedDispatch.cs
- RtfControls.cs
- FixedSOMSemanticBox.cs
- ComponentConverter.cs
- DetailsViewModeEventArgs.cs
- Positioning.cs
- CommonRemoteMemoryBlock.cs
- Single.cs
- DynamicArgumentDesigner.xaml.cs
- Context.cs
- SiteMapProvider.cs
- EncoderExceptionFallback.cs
- ToolStripContentPanelRenderEventArgs.cs
- CalloutQueueItem.cs
- RsaSecurityToken.cs
- XmlAtomicValue.cs
- RectConverter.cs
- UDPClient.cs
- HttpContextServiceHost.cs
- TextParentUndoUnit.cs
- QueryResponse.cs
- MsmqInputChannel.cs
- ConversionContext.cs
- ApplicationDirectoryMembershipCondition.cs
- CatalogPartChrome.cs
- DrawingState.cs
- WebBaseEventKeyComparer.cs
- SqlClientPermission.cs
- CalendarButtonAutomationPeer.cs
- TextRunCacheImp.cs
- BigInt.cs
- HttpCapabilitiesBase.cs
- GenericParameterDataContract.cs
- AuthenticationModulesSection.cs
- DPTypeDescriptorContext.cs
- ZipIOBlockManager.cs
- TransformedBitmap.cs
- AxHostDesigner.cs
- CompilerHelpers.cs
- TargetParameterCountException.cs
- DetailsViewPageEventArgs.cs
- HtmlContainerControl.cs
- HttpCacheParams.cs
- SuppressIldasmAttribute.cs
- TraceLog.cs
- AnchoredBlock.cs
- BaseProcessProtocolHandler.cs
- NullableDecimalAverageAggregationOperator.cs
- DoubleKeyFrameCollection.cs
- WindowsToolbarAsMenu.cs
- ProfilePropertySettingsCollection.cs
- BuildProviderUtils.cs