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
- Substitution.cs
- ImageBrush.cs
- CodeIdentifiers.cs
- Container.cs
- ExpressionEditorSheet.cs
- XmlChildNodes.cs
- ClientTargetCollection.cs
- EventSchemaTraceListener.cs
- QueryExpr.cs
- ImageSource.cs
- SafeEventLogReadHandle.cs
- GridLength.cs
- ListDictionaryInternal.cs
- Visual3D.cs
- CodeAssignStatement.cs
- dbdatarecord.cs
- InlineCategoriesDocument.cs
- OdbcStatementHandle.cs
- EditorResources.cs
- SamlAssertionKeyIdentifierClause.cs
- CSharpCodeProvider.cs
- XhtmlBasicPageAdapter.cs
- SQLDateTime.cs
- Visual.cs
- ChtmlPageAdapter.cs
- DataKeyArray.cs
- ActivityPreviewDesigner.cs
- ObjectViewEntityCollectionData.cs
- TextDecorationCollectionConverter.cs
- AsymmetricCryptoHandle.cs
- FileUtil.cs
- MenuScrollingVisibilityConverter.cs
- RefreshEventArgs.cs
- Condition.cs
- XsdBuildProvider.cs
- DESCryptoServiceProvider.cs
- StorageTypeMapping.cs
- ProviderIncompatibleException.cs
- X509SecurityToken.cs
- KeyToListMap.cs
- FusionWrap.cs
- QilName.cs
- AnnotationHelper.cs
- SystemInformation.cs
- ServiceNameElement.cs
- InProcStateClientManager.cs
- Help.cs
- OperationInvokerBehavior.cs
- ConfigErrorGlyph.cs
- SetStateEventArgs.cs
- PerformanceCounterLib.cs
- Vertex.cs
- RadioButton.cs
- SoapWriter.cs
- ColumnPropertiesGroup.cs
- GeneralTransform2DTo3DTo2D.cs
- ImageDrawing.cs
- MethodExpr.cs
- DataGridViewCellFormattingEventArgs.cs
- StandardOleMarshalObject.cs
- HashLookup.cs
- WebControlParameterProxy.cs
- ThousandthOfEmRealPoints.cs
- Ipv6Element.cs
- DataRowChangeEvent.cs
- SecurityTokenSerializer.cs
- Int64.cs
- SortedList.cs
- EndpointDiscoveryBehavior.cs
- Perspective.cs
- PenLineJoinValidation.cs
- DataGridViewRowCancelEventArgs.cs
- AnnotationDocumentPaginator.cs
- SqlUDTStorage.cs
- MouseActionValueSerializer.cs
- _ProxyChain.cs
- CornerRadius.cs
- HtmlFormWrapper.cs
- TypeInfo.cs
- PanelDesigner.cs
- SiteMapNode.cs
- Pool.cs
- DeclarativeExpressionConditionDeclaration.cs
- SiteMap.cs
- WindowsAuthenticationModule.cs
- MDIClient.cs
- CustomTrackingRecord.cs
- CommonRemoteMemoryBlock.cs
- Property.cs
- XmlSchemaSimpleTypeUnion.cs
- XmlDocumentViewSchema.cs
- ZipFileInfoCollection.cs
- InvokeHandlers.cs
- AuthenticationService.cs
- TraceData.cs
- MeshGeometry3D.cs
- SimpleApplicationHost.cs
- HelpInfo.cs
- PointAnimationClockResource.cs
- TraceFilter.cs