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
- DocumentReferenceCollection.cs
- SpecialFolderEnumConverter.cs
- MemberNameValidator.cs
- CopyAction.cs
- PixelShader.cs
- BinaryMethodMessage.cs
- NumericUpDownAccelerationCollection.cs
- ContextProperty.cs
- Pkcs7Signer.cs
- CodeTypeMemberCollection.cs
- MethodSignatureGenerator.cs
- HttpFileCollection.cs
- DoWorkEventArgs.cs
- Opcode.cs
- SqlDependency.cs
- BigIntegerStorage.cs
- SqlDataSourceView.cs
- HttpRequestCacheValidator.cs
- CreateUserWizard.cs
- EntityWithKeyStrategy.cs
- DefaultTextStore.cs
- QueryContinueDragEvent.cs
- WindowsTitleBar.cs
- CustomMenuItemCollection.cs
- StringConverter.cs
- DesignerActionItemCollection.cs
- FamilyMap.cs
- EdmProviderManifest.cs
- DocumentViewerBaseAutomationPeer.cs
- HttpListenerException.cs
- TabItemAutomationPeer.cs
- InfocardInteractiveChannelInitializer.cs
- ApplicationId.cs
- EncoderParameters.cs
- XmlValidatingReaderImpl.cs
- _AuthenticationState.cs
- WebServiceEnumData.cs
- ArcSegment.cs
- UrlAuthFailedErrorFormatter.cs
- ColorContextHelper.cs
- XmlWellformedWriter.cs
- XmlDocumentSerializer.cs
- CodeIdentifier.cs
- ParsedAttributeCollection.cs
- Permission.cs
- TraceListener.cs
- StringComparer.cs
- DataObjectMethodAttribute.cs
- InheritanceUI.cs
- CompositeControl.cs
- MatchNoneMessageFilter.cs
- BoolExpressionVisitors.cs
- FactoryRecord.cs
- ServiceOperationParameter.cs
- CodeObjectCreateExpression.cs
- RunClient.cs
- AdRotator.cs
- TextDecorations.cs
- CellParaClient.cs
- AppDomainManager.cs
- SoapSchemaExporter.cs
- SpinWait.cs
- recordstatefactory.cs
- Nodes.cs
- InterleavedZipPartStream.cs
- SynthesizerStateChangedEventArgs.cs
- CustomErrorCollection.cs
- ObjectParameter.cs
- invalidudtexception.cs
- TraceSection.cs
- ImageAnimator.cs
- FileLevelControlBuilderAttribute.cs
- PropertyMappingExceptionEventArgs.cs
- PolicyException.cs
- BlockUIContainer.cs
- OLEDB_Enum.cs
- AppSettingsReader.cs
- DataBoundControlHelper.cs
- _LazyAsyncResult.cs
- SoapObjectInfo.cs
- FlowThrottle.cs
- Symbol.cs
- WindowsUpDown.cs
- FrameworkContentElement.cs
- SqlDependencyUtils.cs
- XmlQualifiedName.cs
- CodeTryCatchFinallyStatement.cs
- GridViewCancelEditEventArgs.cs
- AuthStoreRoleProvider.cs
- SR.cs
- XmlSerializationGeneratedCode.cs
- ServiceConfigurationTraceRecord.cs
- XmlSchemaSimpleContentExtension.cs
- SafeCertificateStore.cs
- XPathExpr.cs
- DocumentGridPage.cs
- Floater.cs
- PageCodeDomTreeGenerator.cs
- DataRecordInternal.cs