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
- TextSelectionProcessor.cs
- CollectionChangedEventManager.cs
- DataContractSerializerSection.cs
- SharedConnectionListener.cs
- AnnotationAuthorChangedEventArgs.cs
- ModuleConfigurationInfo.cs
- SystemEvents.cs
- RawMouseInputReport.cs
- IdleTimeoutMonitor.cs
- IssuedTokenClientElement.cs
- EmissiveMaterial.cs
- BamlTreeUpdater.cs
- DbUpdateCommandTree.cs
- WebPartMinimizeVerb.cs
- PropertyEntry.cs
- ApplicationFileCodeDomTreeGenerator.cs
- streamingZipPartStream.cs
- DataQuery.cs
- SpeechUI.cs
- URLBuilder.cs
- Cursors.cs
- CommandEventArgs.cs
- OrCondition.cs
- Scene3D.cs
- SemaphoreFullException.cs
- FrameworkElement.cs
- SelectionEditingBehavior.cs
- WSFederationHttpSecurityMode.cs
- XmlSortKeyAccumulator.cs
- ReadOnlyCollectionBase.cs
- AssertSection.cs
- SecurityUtils.cs
- AdCreatedEventArgs.cs
- ActivityMarkupSerializer.cs
- HtmlMobileTextWriter.cs
- NullableIntSumAggregationOperator.cs
- Stack.cs
- ReferenceCountedObject.cs
- HttpServerChannel.cs
- XmlDataSource.cs
- PopupControlService.cs
- CharacterMetrics.cs
- MediaElement.cs
- QuaternionKeyFrameCollection.cs
- EditingCoordinator.cs
- DataGridViewRowHeaderCell.cs
- DataGridViewImageCell.cs
- EastAsianLunisolarCalendar.cs
- securitycriticaldataClass.cs
- BrowserCapabilitiesCompiler.cs
- SiteMapDataSourceView.cs
- FacetChecker.cs
- Exceptions.cs
- ArrayHelper.cs
- EndpointReference.cs
- QuaternionRotation3D.cs
- BindMarkupExtensionSerializer.cs
- SemanticAnalyzer.cs
- WorkflowViewManager.cs
- MimeFormatter.cs
- CryptoApi.cs
- DataGridHyperlinkColumn.cs
- ServiceHandle.cs
- EastAsianLunisolarCalendar.cs
- UnitySerializationHolder.cs
- PerformanceCounter.cs
- TaskFormBase.cs
- XmlMemberMapping.cs
- SafeFileMappingHandle.cs
- XmlSchemaObjectCollection.cs
- CodeGenerator.cs
- SettingsPropertyValueCollection.cs
- XamlWrappingReader.cs
- RawStylusActions.cs
- SingleTagSectionHandler.cs
- PrimitiveSchema.cs
- FontWeights.cs
- DoWorkEventArgs.cs
- PathFigureCollectionValueSerializer.cs
- SpellerError.cs
- DataRelationCollection.cs
- AdjustableArrowCap.cs
- ClassHandlersStore.cs
- CodeAttributeDeclarationCollection.cs
- HybridWebProxyFinder.cs
- StringComparer.cs
- DbProviderFactories.cs
- EdgeProfileValidation.cs
- GenericEnumerator.cs
- OrderedDictionaryStateHelper.cs
- UriSchemeKeyedCollection.cs
- XmlMemberMapping.cs
- HTTPNotFoundHandler.cs
- TreeViewImageKeyConverter.cs
- FixedNode.cs
- CookieParameter.cs
- XmlSerializerAssemblyAttribute.cs
- ADMembershipUser.cs
- SqlReferenceCollection.cs
- AddInSegmentDirectoryNotFoundException.cs