Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / DurableInstancing / InstanceHandleReference.cs / 1305376 / InstanceHandleReference.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Runtime.DurableInstancing { // This class serves as a reference back to an InstanceHandle from the perspective of an InstanceOwner for tracking lock binds in progress. // It works in two modes, one as a pure cancelable handle reference (where cancelling means nulling out the reference) and the // other as a queue position marker for determining when all of the in-progress requests at one point in time are all done. In the // marker mode (InstanceOwner.LockResolutionMarker), it carries some additional context for maintaining the state of the // InstancePersistenceContext.ResolveExistingLock operation. class InstanceHandleReference { internal InstanceHandleReference(InstanceHandle instanceHandle) { Fx.Assert(instanceHandle != null, "Null instanceHandle provided to InstanceHandleReference."); InstanceHandle = instanceHandle; } // This is set to null when the InstanceHandleReference is detached from the InstanceHandle - i.e. it is // no longer in use, and exists just to make it possible to lazily drain out of the various queues. internal InstanceHandle InstanceHandle { get; private set; } internal void Cancel() { Fx.Assert(InstanceHandle != null, "InstanceHandleReference already cancelled."); InstanceHandle = null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Runtime.DurableInstancing { // This class serves as a reference back to an InstanceHandle from the perspective of an InstanceOwner for tracking lock binds in progress. // It works in two modes, one as a pure cancelable handle reference (where cancelling means nulling out the reference) and the // other as a queue position marker for determining when all of the in-progress requests at one point in time are all done. In the // marker mode (InstanceOwner.LockResolutionMarker), it carries some additional context for maintaining the state of the // InstancePersistenceContext.ResolveExistingLock operation. class InstanceHandleReference { internal InstanceHandleReference(InstanceHandle instanceHandle) { Fx.Assert(instanceHandle != null, "Null instanceHandle provided to InstanceHandleReference."); InstanceHandle = instanceHandle; } // This is set to null when the InstanceHandleReference is detached from the InstanceHandle - i.e. it is // no longer in use, and exists just to make it possible to lazily drain out of the various queues. internal InstanceHandle InstanceHandle { get; private set; } internal void Cancel() { Fx.Assert(InstanceHandle != null, "InstanceHandleReference already cancelled."); InstanceHandle = null; } } } // 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
- SiteMapNode.cs
- CheckBoxFlatAdapter.cs
- M3DUtil.cs
- BindStream.cs
- SizeAnimationUsingKeyFrames.cs
- DataGridTablesFactory.cs
- ReadOnlyState.cs
- WebPartConnectionsEventArgs.cs
- WebPartDisplayModeCancelEventArgs.cs
- CultureInfoConverter.cs
- DBCSCodePageEncoding.cs
- IImplicitResourceProvider.cs
- WebPartTransformerAttribute.cs
- WmlImageAdapter.cs
- SizeFConverter.cs
- DataSourceControlBuilder.cs
- QilPatternFactory.cs
- PropertyTab.cs
- ConnectionDemuxer.cs
- SiteMapPath.cs
- UserControl.cs
- DesignerOptionService.cs
- DesigntimeLicenseContextSerializer.cs
- PropertyExpression.cs
- RemoteWebConfigurationHostStream.cs
- DataControlImageButton.cs
- DataBinder.cs
- BamlCollectionHolder.cs
- GenerateScriptTypeAttribute.cs
- MouseBinding.cs
- PresentationTraceSources.cs
- Compilation.cs
- SchemaImporterExtensionElement.cs
- CookieParameter.cs
- SqlClientPermission.cs
- DataListItem.cs
- TextBox.cs
- KeyboardEventArgs.cs
- WindowsScrollBarBits.cs
- CfgRule.cs
- smtpconnection.cs
- SchemaManager.cs
- ReadOnlyHierarchicalDataSourceView.cs
- CellCreator.cs
- HttpModuleAction.cs
- ResourceCodeDomSerializer.cs
- Parameter.cs
- XLinq.cs
- FilterQueryOptionExpression.cs
- ByteStack.cs
- translator.cs
- TypeConvertions.cs
- ToolStripItemTextRenderEventArgs.cs
- MSAANativeProvider.cs
- ProtocolImporter.cs
- ManagementClass.cs
- TemplatePagerField.cs
- QueryValue.cs
- WorkflowViewService.cs
- StringArrayEditor.cs
- infer.cs
- Point4D.cs
- ClipboardData.cs
- GeometryCollection.cs
- SafeViewOfFileHandle.cs
- XmlStrings.cs
- RankException.cs
- ScopelessEnumAttribute.cs
- TransformerInfo.cs
- SymmetricKeyWrap.cs
- Part.cs
- ForEachAction.cs
- NativeMethods.cs
- TargetControlTypeCache.cs
- TextServicesPropertyRanges.cs
- XmlReaderDelegator.cs
- EntitySet.cs
- IndentTextWriter.cs
- SqlGenerator.cs
- ButtonBaseAutomationPeer.cs
- SharedPersonalizationStateInfo.cs
- OuterGlowBitmapEffect.cs
- UriExt.cs
- MatrixTransform3D.cs
- TypeBinaryExpression.cs
- TrackingWorkflowEventArgs.cs
- StartUpEventArgs.cs
- _ConnectionGroup.cs
- EntityKey.cs
- ZipPackagePart.cs
- DrawingContextDrawingContextWalker.cs
- OdbcInfoMessageEvent.cs
- SafeFileMappingHandle.cs
- ResXResourceWriter.cs
- CompiledIdentityConstraint.cs
- MimePart.cs
- Attributes.cs
- StrokeNodeOperations2.cs
- DataGridRelationshipRow.cs
- DesignerDataRelationship.cs