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
- WorkflowPrinting.cs
- BamlTreeUpdater.cs
- ItemType.cs
- Image.cs
- Color.cs
- DataServiceContext.cs
- Cursors.cs
- XPathArrayIterator.cs
- TraceProvider.cs
- WebPartZoneBase.cs
- LOSFormatter.cs
- CrossContextChannel.cs
- ZoneButton.cs
- PageCatalogPart.cs
- SchemaSetCompiler.cs
- Oid.cs
- PropertyDescriptorGridEntry.cs
- EditorAttribute.cs
- DBCommand.cs
- StorageBasedPackageProperties.cs
- AnnotationDocumentPaginator.cs
- SpeechAudioFormatInfo.cs
- ConstrainedDataObject.cs
- SocketPermission.cs
- AppSecurityManager.cs
- NavigationWindowAutomationPeer.cs
- GridViewDeletedEventArgs.cs
- ActivityInterfaces.cs
- JavaScriptString.cs
- FormatSelectingMessageInspector.cs
- MaskedTextBoxTextEditor.cs
- ValidatorCollection.cs
- X509Chain.cs
- Mappings.cs
- CellTreeNode.cs
- InstanceLockLostException.cs
- CodeNamespace.cs
- DesignerResources.cs
- LinearGradientBrush.cs
- X509Utils.cs
- PkcsUtils.cs
- AppDomainManager.cs
- ToolStripPanelCell.cs
- SystemInformation.cs
- UIElementParagraph.cs
- WsatStrings.cs
- SoapAttributeAttribute.cs
- LinearGradientBrush.cs
- SqlMethodTransformer.cs
- Variable.cs
- ComponentResourceKey.cs
- EmptyQuery.cs
- Part.cs
- PriorityRange.cs
- ClientProxyGenerator.cs
- Point4DConverter.cs
- ConfigurationStrings.cs
- SafeNativeMethodsCLR.cs
- AccessControlEntry.cs
- ElementNotAvailableException.cs
- Package.cs
- PermissionSetTriple.cs
- ScrollBar.cs
- ScrollProperties.cs
- DataTableReader.cs
- WebPartZoneCollection.cs
- ImageFormat.cs
- ChooseAction.cs
- DataObjectFieldAttribute.cs
- JoinGraph.cs
- TracePayload.cs
- RtfFormatStack.cs
- JoinCqlBlock.cs
- AnnotationMap.cs
- InheritanceContextChangedEventManager.cs
- ResourceProviderFactory.cs
- ListDictionary.cs
- DependencyObjectType.cs
- DateTimePicker.cs
- WithStatement.cs
- TileBrush.cs
- StorageScalarPropertyMapping.cs
- IriParsingElement.cs
- PipeSecurity.cs
- PartialCachingAttribute.cs
- EmptyEnumerable.cs
- CounterCreationData.cs
- autovalidator.cs
- SqlFunctionAttribute.cs
- RequestSecurityToken.cs
- WindowsProgressbar.cs
- HttpDigestClientElement.cs
- CfgSemanticTag.cs
- PipeStream.cs
- GraphicsContainer.cs
- ToolStripHighContrastRenderer.cs
- HttpRequestContext.cs
- ConstantExpression.cs
- JsonByteArrayDataContract.cs
- GridViewColumnHeaderAutomationPeer.cs