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
- PageClientProxyGenerator.cs
- BufferModesCollection.cs
- ObjectQuery_EntitySqlExtensions.cs
- DataGridViewAdvancedBorderStyle.cs
- DirectoryInfo.cs
- ConfigurationErrorsException.cs
- ISCIIEncoding.cs
- ServiceSettingsResponseInfo.cs
- Style.cs
- OrthographicCamera.cs
- SmtpNegotiateAuthenticationModule.cs
- AggregationMinMaxHelpers.cs
- AxParameterData.cs
- DeploymentSectionCache.cs
- DataGridViewComboBoxColumn.cs
- httpserverutility.cs
- FileRegion.cs
- ProcessThreadCollection.cs
- Pair.cs
- WindowsAuthenticationModule.cs
- SmiMetaData.cs
- BindingExpression.cs
- GlobalEventManager.cs
- TableLayoutCellPaintEventArgs.cs
- HtmlTableCellCollection.cs
- MemberCollection.cs
- SqlCacheDependencyDatabase.cs
- IntSecurity.cs
- Literal.cs
- TableLayoutStyle.cs
- CommonGetThemePartSize.cs
- RouteCollection.cs
- InheritanceAttribute.cs
- SplitContainer.cs
- DataBoundLiteralControl.cs
- DataGridViewCellMouseEventArgs.cs
- FormatControl.cs
- AttachedPropertiesService.cs
- MsmqBindingFilter.cs
- AsyncPostBackErrorEventArgs.cs
- FunctionUpdateCommand.cs
- InvokeGenerator.cs
- TabControlAutomationPeer.cs
- RegexNode.cs
- CustomExpressionEventArgs.cs
- XmlSchemaAttributeGroupRef.cs
- TemplateKey.cs
- Attributes.cs
- TimeoutConverter.cs
- CanonicalFormWriter.cs
- Rights.cs
- TemplateInstanceAttribute.cs
- BulletChrome.cs
- JoinCqlBlock.cs
- HostedElements.cs
- HierarchicalDataSourceControl.cs
- DataGridViewCellParsingEventArgs.cs
- ListView.cs
- XmlDeclaration.cs
- ComplexObject.cs
- WCFModelStrings.Designer.cs
- LightweightEntityWrapper.cs
- ParameterCollection.cs
- PrintPreviewGraphics.cs
- OleStrCAMarshaler.cs
- NullRuntimeConfig.cs
- DataTemplateSelector.cs
- ObjectStateFormatter.cs
- SecurityDescriptor.cs
- AlgoModule.cs
- ContractMapping.cs
- CalendarKeyboardHelper.cs
- InternalConfigSettingsFactory.cs
- DecoderFallbackWithFailureFlag.cs
- SqlCacheDependencyDatabaseCollection.cs
- TableRow.cs
- OletxTransactionManager.cs
- EpmContentSerializer.cs
- DesignerSerializerAttribute.cs
- DtrList.cs
- StringValidator.cs
- SqlSelectStatement.cs
- ConfigurationProviderException.cs
- FileInfo.cs
- LayoutEngine.cs
- MethodBuilder.cs
- EditorAttribute.cs
- CacheOutputQuery.cs
- MimeImporter.cs
- FormsAuthentication.cs
- CqlWriter.cs
- XomlCompilerError.cs
- DataGridViewRowPrePaintEventArgs.cs
- XmlAtomicValue.cs
- ValueType.cs
- LoginUtil.cs
- BatchParser.cs
- WebReferenceOptions.cs
- Aggregates.cs
- NominalTypeEliminator.cs