Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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 [....] 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,
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// 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 [....] 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,
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GifBitmapEncoder.cs
- RtfControls.cs
- TypeForwardedToAttribute.cs
- IncrementalReadDecoders.cs
- CodeNamespaceImportCollection.cs
- StyleXamlParser.cs
- PointAnimationClockResource.cs
- XmlNavigatorStack.cs
- PerformanceCounterManager.cs
- ThreadExceptionDialog.cs
- PageHandlerFactory.cs
- MetaForeignKeyColumn.cs
- KeyEvent.cs
- GridItem.cs
- DropDownButton.cs
- DateTimeOffsetAdapter.cs
- SqlDeflator.cs
- FormDesigner.cs
- RemoteWebConfigurationHostStream.cs
- VirtualizingStackPanel.cs
- CompositionDesigner.cs
- FontConverter.cs
- Matrix3D.cs
- InternalRelationshipCollection.cs
- Process.cs
- ToolStripItemTextRenderEventArgs.cs
- Win32KeyboardDevice.cs
- DataControlPagerLinkButton.cs
- RichTextBox.cs
- DataException.cs
- BypassElementCollection.cs
- HtmlAnchor.cs
- DataGridViewTextBoxCell.cs
- XPathDocument.cs
- TrackingConditionCollection.cs
- SmiEventSink.cs
- XmlCharCheckingReader.cs
- PropertyConverter.cs
- ErrorLog.cs
- SecurityDocument.cs
- ThicknessConverter.cs
- Encoding.cs
- TextTreeTextElementNode.cs
- PaginationProgressEventArgs.cs
- ConditionValidator.cs
- ListView.cs
- UnsafeNativeMethods.cs
- SystemResources.cs
- TraceFilter.cs
- EditorPartCollection.cs
- WebPartZone.cs
- EncoderParameter.cs
- SqlMethodTransformer.cs
- IfJoinedCondition.cs
- SapiRecognizer.cs
- ItemCollectionEditor.cs
- ApplicationInterop.cs
- ValidationVisibilityAttribute.cs
- CommandField.cs
- EntityReference.cs
- UnionCodeGroup.cs
- GridViewCommandEventArgs.cs
- TreeBuilder.cs
- PieceDirectory.cs
- ToolStripGrip.cs
- WebPartHeaderCloseVerb.cs
- DefaultTextStore.cs
- AttributeCollection.cs
- ChildDocumentBlock.cs
- SimpleHandlerBuildProvider.cs
- WorkflowRuntimeElement.cs
- BamlStream.cs
- ReliableMessagingHelpers.cs
- SerializationObjectManager.cs
- FixedMaxHeap.cs
- NativeObjectSecurity.cs
- SystemWebExtensionsSectionGroup.cs
- SqlCharStream.cs
- NetworkInformationPermission.cs
- ScrollEventArgs.cs
- CompatibleComparer.cs
- ChtmlTextWriter.cs
- FileUtil.cs
- NotificationContext.cs
- HtmlForm.cs
- FamilyCollection.cs
- InboundActivityHelper.cs
- SubMenuStyle.cs
- ConfigurationSectionHelper.cs
- ListBindingHelper.cs
- DataRowChangeEvent.cs
- CodeCompiler.cs
- WebPartPersonalization.cs
- VerticalAlignConverter.cs
- TreeViewItemAutomationPeer.cs
- _NestedSingleAsyncResult.cs
- IconBitmapDecoder.cs
- Switch.cs
- ProtocolElement.cs
- DurableTimerExtension.cs