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
- EventProvider.cs
- Win32Exception.cs
- SoapFormatExtensions.cs
- RequestContext.cs
- HostUtils.cs
- MatchingStyle.cs
- TextElementCollectionHelper.cs
- httpserverutility.cs
- CodeTypeDeclaration.cs
- DependencySource.cs
- IpcManager.cs
- WindowsRegion.cs
- PartDesigner.cs
- D3DImage.cs
- Block.cs
- CodeThrowExceptionStatement.cs
- TableStyle.cs
- DataGridToolTip.cs
- Stopwatch.cs
- WebPartZoneBase.cs
- Group.cs
- MatcherBuilder.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- WebDisplayNameAttribute.cs
- PassportAuthentication.cs
- PositiveTimeSpanValidator.cs
- BuilderPropertyEntry.cs
- TextRunCacheImp.cs
- CommandLibraryHelper.cs
- ProfileGroupSettings.cs
- JavaScriptString.cs
- DesignSurface.cs
- IsolatedStorageFileStream.cs
- EmptyControlCollection.cs
- OutputCacheSection.cs
- UnmanagedMemoryStreamWrapper.cs
- ImageInfo.cs
- ChildrenQuery.cs
- DictionaryCustomTypeDescriptor.cs
- TraceEventCache.cs
- CellNormalizer.cs
- ContractComponent.cs
- ConnectionStringsSection.cs
- XmlCodeExporter.cs
- FixedDocumentSequencePaginator.cs
- XmlSchema.cs
- DataStreams.cs
- ObjectComplexPropertyMapping.cs
- TargetInvocationException.cs
- SelectManyQueryOperator.cs
- MultiBinding.cs
- Timer.cs
- FormViewDeleteEventArgs.cs
- XDRSchema.cs
- ButtonBaseAutomationPeer.cs
- EntityFrameworkVersions.cs
- PlaceHolder.cs
- DictionarySectionHandler.cs
- UserNameSecurityTokenProvider.cs
- PerformanceCounterPermissionAttribute.cs
- Pen.cs
- HttpContextBase.cs
- LambdaCompiler.Binary.cs
- TypeDescriptionProvider.cs
- AccessibilityHelperForVista.cs
- GenericTextProperties.cs
- SoapConverter.cs
- FileSystemWatcher.cs
- FixedTextView.cs
- CodeChecksumPragma.cs
- TraceHwndHost.cs
- StylusOverProperty.cs
- PointHitTestResult.cs
- DataKeyArray.cs
- WebServiceBindingAttribute.cs
- Geometry3D.cs
- HtmlShim.cs
- ScriptControlDescriptor.cs
- HttpRawResponse.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- AuthenticatedStream.cs
- MimePart.cs
- HyperLinkDataBindingHandler.cs
- DrawingBrush.cs
- ComponentResourceManager.cs
- JsonByteArrayDataContract.cs
- DateTimeUtil.cs
- FastEncoderStatics.cs
- InvalidAsynchronousStateException.cs
- PKCS1MaskGenerationMethod.cs
- HotSpotCollectionEditor.cs
- DependencyObject.cs
- HWStack.cs
- ShutDownListener.cs
- OutOfMemoryException.cs
- OpenFileDialog.cs
- XmlSchemaSimpleContent.cs
- HtmlInputReset.cs
- ToolStripDropDownMenu.cs
- IPAddressCollection.cs