Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Runtime / Serialization / StreamingContext.cs / 1 / StreamingContext.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** ValueType: StreamingContext
**
**
** Purpose: A value type indicating the source or destination of our streaming.
**
**
===========================================================*/
namespace System.Runtime.Serialization {
using System.Runtime.Remoting;
using System;
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct StreamingContext {
internal Object m_additionalContext;
internal StreamingContextStates m_state;
public StreamingContext(StreamingContextStates state)
: this (state, null) {
}
public StreamingContext(StreamingContextStates state, Object additional) {
m_state = state;
m_additionalContext = additional;
}
public Object Context {
get { return m_additionalContext; }
}
public override bool Equals(Object obj) {
if (!(obj is StreamingContext)) {
return false;
}
if (((StreamingContext)obj).m_additionalContext == m_additionalContext &&
((StreamingContext)obj).m_state == m_state) {
return true;
}
return false;
}
public override int GetHashCode() {
return (int)m_state;
}
public StreamingContextStates State {
get { return m_state; }
}
}
// *********************************************************
// Keep these in sync with the version in vm\runtimehandles.h
// *********************************************************
[Serializable, Flags]
[System.Runtime.InteropServices.ComVisible(true)]
public enum StreamingContextStates {
CrossProcess=0x01,
CrossMachine=0x02,
File =0x04,
Persistence =0x08,
Remoting =0x10,
Other =0x20,
Clone =0x40,
CrossAppDomain =0x80,
All =0xFF,
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ParameterBinding.cs
- StylusButtonEventArgs.cs
- SocketPermission.cs
- PropVariant.cs
- SerializableAttribute.cs
- StyleTypedPropertyAttribute.cs
- dataSvcMapFileLoader.cs
- DocumentApplication.cs
- WebEvents.cs
- TreeNodeStyleCollectionEditor.cs
- SystemIPInterfaceStatistics.cs
- HighlightComponent.cs
- ProfileProvider.cs
- FieldToken.cs
- CanonicalFontFamilyReference.cs
- DataGridViewMethods.cs
- DefaultTextStoreTextComposition.cs
- WebContext.cs
- ParserExtension.cs
- NativeMethods.cs
- PropertyEntry.cs
- AccessViolationException.cs
- FeatureSupport.cs
- DirectionalLight.cs
- RepeaterCommandEventArgs.cs
- BufferedGraphicsContext.cs
- XmlNotation.cs
- DataListItem.cs
- WindowsRebar.cs
- ScriptReferenceEventArgs.cs
- NotImplementedException.cs
- SynchronizationContext.cs
- PropertyGroupDescription.cs
- DataGridViewCellStyle.cs
- ReceiveReply.cs
- D3DImage.cs
- EntityContainerEmitter.cs
- XPathDescendantIterator.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ListViewSortEventArgs.cs
- ShaderEffect.cs
- AttributeSetAction.cs
- SaveFileDialog.cs
- HtmlFormParameterWriter.cs
- NetStream.cs
- TagPrefixCollection.cs
- ValueChangedEventManager.cs
- XLinq.cs
- ProcessProtocolHandler.cs
- MergeEnumerator.cs
- SoapCodeExporter.cs
- LoginCancelEventArgs.cs
- CodeComment.cs
- OleDbEnumerator.cs
- XmlResolver.cs
- GeneralTransform3DGroup.cs
- RangeValuePatternIdentifiers.cs
- IChannel.cs
- DebugHandleTracker.cs
- AdPostCacheSubstitution.cs
- CodeEntryPointMethod.cs
- TickBar.cs
- XsltLibrary.cs
- UntrustedRecipientException.cs
- mactripleDES.cs
- PlatformCulture.cs
- AssemblyName.cs
- HostUtils.cs
- MultiSelector.cs
- RegistrationServices.cs
- GroupBox.cs
- TreeView.cs
- SessionState.cs
- ServiceContractGenerationContext.cs
- Win32SafeHandles.cs
- EDesignUtil.cs
- DefaultExpression.cs
- Viewport3DAutomationPeer.cs
- ThreadStaticAttribute.cs
- ColumnMapCopier.cs
- LightweightEntityWrapper.cs
- XamlFilter.cs
- StronglyTypedResourceBuilder.cs
- SecurityElement.cs
- EmptyEnumerable.cs
- Metadata.cs
- DataGridCellEditEndingEventArgs.cs
- _NTAuthentication.cs
- HeaderUtility.cs
- RichTextBox.cs
- ListViewItemMouseHoverEvent.cs
- WebPartConnectionsConfigureVerb.cs
- IdleTimeoutMonitor.cs
- DataGridViewCheckBoxCell.cs
- WebPartConnectionsCancelVerb.cs
- HierarchicalDataBoundControlAdapter.cs
- AppDomainCompilerProxy.cs
- OleDbCommandBuilder.cs
- RadialGradientBrush.cs
- SafeEventLogWriteHandle.cs