Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Messaging / System / Messaging / Cursor.cs / 1305376 / Cursor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Messaging { using System.Messaging.Interop; public sealed class Cursor : IDisposable { private CursorHandle handle; private bool disposed; internal Cursor(MessageQueue queue) { CursorHandle result; int status = SafeNativeMethods.MQCreateCursor(queue.MQInfo.ReadHandle, out result); if (MessageQueue.IsFatalError(status)) throw new MessageQueueException(status); this.handle = result; } internal CursorHandle Handle { get { if (disposed) throw new ObjectDisposedException(GetType().Name); return handle; } } public void Close() { handle.Close(); } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } void Dispose(bool disposing) { // disposing argument is intentionally unused this.Close(); this.disposed = true; } ~Cursor() { Dispose(false); } } } // 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
- CodeConstructor.cs
- WebRequest.cs
- DuplicateDetector.cs
- DetailsViewInsertedEventArgs.cs
- Rect3DConverter.cs
- XPathNodeIterator.cs
- EntityDescriptor.cs
- ExecutionContext.cs
- XmlToDatasetMap.cs
- FieldBuilder.cs
- DataService.cs
- PartitionResolver.cs
- WebPermission.cs
- UIntPtr.cs
- WebPartDeleteVerb.cs
- DirtyTextRange.cs
- Span.cs
- CodeCommentStatement.cs
- Timer.cs
- PerspectiveCamera.cs
- ItemCheckedEvent.cs
- SelectionUIHandler.cs
- CompiledQueryCacheKey.cs
- FormViewInsertEventArgs.cs
- ThumbAutomationPeer.cs
- TracingConnectionListener.cs
- ProvideValueServiceProvider.cs
- Privilege.cs
- TargetPerspective.cs
- UdpConstants.cs
- AnnotationStore.cs
- ScrollPattern.cs
- RichTextBox.cs
- CodeAccessPermission.cs
- SqlError.cs
- TargetParameterCountException.cs
- PassportAuthenticationEventArgs.cs
- ExtendedProtectionPolicy.cs
- ScrollItemPatternIdentifiers.cs
- FontSourceCollection.cs
- Convert.cs
- PolicyException.cs
- ArraySubsetEnumerator.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ValidationPropertyAttribute.cs
- CodeTypeReference.cs
- KeyGesture.cs
- PowerModeChangedEventArgs.cs
- IPEndPointCollection.cs
- OleDbRowUpdatingEvent.cs
- FontEmbeddingManager.cs
- NotSupportedException.cs
- XmlNavigatorFilter.cs
- IndentTextWriter.cs
- TypeExtensions.cs
- XmlSerializationReader.cs
- indexingfiltermarshaler.cs
- PrimitiveDataContract.cs
- DBDataPermissionAttribute.cs
- Point.cs
- OutArgumentConverter.cs
- PaperSource.cs
- PointUtil.cs
- SerializationObjectManager.cs
- BlobPersonalizationState.cs
- DocumentSchemaValidator.cs
- SqlErrorCollection.cs
- EventQueueState.cs
- WebPartZoneBase.cs
- ButtonRenderer.cs
- Label.cs
- TTSEngineProxy.cs
- BadImageFormatException.cs
- VisualBrush.cs
- Pkcs9Attribute.cs
- unsafeIndexingFilterStream.cs
- WebPartConnectionsEventArgs.cs
- MenuCommandsChangedEventArgs.cs
- RelatedPropertyManager.cs
- TabControlAutomationPeer.cs
- PathNode.cs
- ServiceDeploymentInfo.cs
- QueryAsyncResult.cs
- ObjRef.cs
- FlowLayoutPanel.cs
- ToolStripRendererSwitcher.cs
- XMLSyntaxException.cs
- iisPickupDirectory.cs
- SizeConverter.cs
- ItemCollectionEditor.cs
- PartitionedDataSource.cs
- ScriptResourceHandler.cs
- ListenerSessionConnectionReader.cs
- AsymmetricAlgorithm.cs
- SchemaImporterExtensionElement.cs
- SolidColorBrush.cs
- RuntimeArgument.cs
- ItemContainerPattern.cs
- XmlSchemaExternal.cs
- InputScopeManager.cs