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
- DataGridViewButtonCell.cs
- MetadataFile.cs
- XmlBinaryReader.cs
- FtpCachePolicyElement.cs
- StatusBarDrawItemEvent.cs
- WebPartCloseVerb.cs
- GroupDescription.cs
- FileDialogCustomPlacesCollection.cs
- RoutedUICommand.cs
- GlyphRunDrawing.cs
- PrintPreviewGraphics.cs
- ApplicationCommands.cs
- ApplyImportsAction.cs
- RowUpdatedEventArgs.cs
- GenerateHelper.cs
- StoryFragments.cs
- OpenTypeCommon.cs
- SplineQuaternionKeyFrame.cs
- OpenTypeCommon.cs
- StringDictionaryEditor.cs
- BulletDecorator.cs
- SemanticAnalyzer.cs
- EdmProviderManifest.cs
- LongTypeConverter.cs
- KnownTypesProvider.cs
- AutomationProperty.cs
- ScriptReferenceEventArgs.cs
- OdbcConnectionOpen.cs
- WaitHandle.cs
- StateMachineWorkflow.cs
- MDIClient.cs
- AssemblyNameProxy.cs
- Char.cs
- PathFigureCollection.cs
- AssemblyFilter.cs
- DefaultAssemblyResolver.cs
- EntityDataSourceSelectedEventArgs.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- Pkcs9Attribute.cs
- SynchronizedCollection.cs
- ClaimComparer.cs
- RangeBaseAutomationPeer.cs
- NameValueConfigurationCollection.cs
- FtpWebResponse.cs
- CurrentChangingEventManager.cs
- ExpressionLexer.cs
- ProcessInfo.cs
- SerialPinChanges.cs
- TokenBasedSet.cs
- LocationEnvironment.cs
- XmlUtil.cs
- ToolStripArrowRenderEventArgs.cs
- ObjectDataSourceMethodEventArgs.cs
- Material.cs
- PreservationFileWriter.cs
- DockAndAnchorLayout.cs
- EditorZone.cs
- SinglePhaseEnlistment.cs
- CodeLinePragma.cs
- ResourceDictionary.cs
- CommandField.cs
- SectionInput.cs
- SelectedDatesCollection.cs
- Scene3D.cs
- CompositeDispatchFormatter.cs
- SafeNativeMethods.cs
- JavaScriptSerializer.cs
- BuildResult.cs
- RegexMatch.cs
- CommentEmitter.cs
- TranslateTransform.cs
- XamlTemplateSerializer.cs
- ImageListUtils.cs
- EmbeddedMailObject.cs
- DBNull.cs
- VisualTreeHelper.cs
- StaticTextPointer.cs
- PropertyChangeTracker.cs
- ChannelSinkStacks.cs
- PcmConverter.cs
- DataRowComparer.cs
- PointConverter.cs
- JsonFormatMapping.cs
- DataPagerFieldItem.cs
- SqlException.cs
- JulianCalendar.cs
- RIPEMD160.cs
- BitmapFrameEncode.cs
- WindowsImpersonationContext.cs
- Guid.cs
- VectorValueSerializer.cs
- Size.cs
- IRCollection.cs
- XsltFunctions.cs
- Underline.cs
- IPAddress.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- XmlStreamNodeWriter.cs
- XmlExpressionDumper.cs
- EqualityArray.cs