Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Messaging / System / Messaging / SecurityContext.cs / 1305376 / SecurityContext.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Messaging { using System.Messaging.Interop; public sealed class SecurityContext : IDisposable { SecurityContextHandle handle; bool disposed; internal SecurityContext(SecurityContextHandle securityContext) { handle = securityContext; } internal SecurityContextHandle Handle { get { if (disposed) throw new ObjectDisposedException(GetType().Name); return handle; } } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } void Dispose(bool disposing) { if (disposing) handle.Close(); disposed = true; } ~SecurityContext() { Dispose(false); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Messaging { using System.Messaging.Interop; public sealed class SecurityContext : IDisposable { SecurityContextHandle handle; bool disposed; internal SecurityContext(SecurityContextHandle securityContext) { handle = securityContext; } internal SecurityContextHandle Handle { get { if (disposed) throw new ObjectDisposedException(GetType().Name); return handle; } } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } void Dispose(bool disposing) { if (disposing) handle.Close(); disposed = true; } ~SecurityContext() { 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
- PickBranch.cs
- TrackingServices.cs
- FileLevelControlBuilderAttribute.cs
- TextViewBase.cs
- ScrollData.cs
- CodeGotoStatement.cs
- CultureMapper.cs
- AppSettingsExpressionBuilder.cs
- ConstNode.cs
- SeekableReadStream.cs
- TextDecorations.cs
- X509Extension.cs
- AnnotationMap.cs
- VisualBasicImportReference.cs
- QilName.cs
- OrderedDictionary.cs
- CalendarDay.cs
- ScriptReference.cs
- ItemsControl.cs
- StreamedFramingRequestChannel.cs
- SimpleWebHandlerParser.cs
- IssuedTokenClientCredential.cs
- PageStatePersister.cs
- CommonDialog.cs
- CodeLinePragma.cs
- NegotiateStream.cs
- URL.cs
- LinqToSqlWrapper.cs
- OrderByQueryOptionExpression.cs
- HashCodeCombiner.cs
- CheckoutException.cs
- ApplicationCommands.cs
- Configuration.cs
- GridLength.cs
- RelativeSource.cs
- PhysicalOps.cs
- DoubleLink.cs
- IBuiltInEvidence.cs
- XPathNavigatorKeyComparer.cs
- HashSetDebugView.cs
- QueryReaderSettings.cs
- Helpers.cs
- PersonalizationStateQuery.cs
- TransformerInfo.cs
- SizeFConverter.cs
- ToolboxItem.cs
- XsdBuilder.cs
- SchemaExporter.cs
- RawStylusInputCustomData.cs
- DynamicUpdateCommand.cs
- HeaderedItemsControl.cs
- HitTestDrawingContextWalker.cs
- ConfigurationValue.cs
- DynamicDiscoSearcher.cs
- MenuAdapter.cs
- ActiveXHelper.cs
- ObjectIDGenerator.cs
- SmtpReplyReader.cs
- XmlDesigner.cs
- ResourcePermissionBase.cs
- DataGridHeaderBorder.cs
- ServiceThrottle.cs
- SecurityTokenProvider.cs
- AlternateView.cs
- TextEditorSpelling.cs
- ResourceProviderFactory.cs
- UpdateRecord.cs
- DispatcherHooks.cs
- ResponseBodyWriter.cs
- ColumnMapVisitor.cs
- ArrayList.cs
- JulianCalendar.cs
- TextSpan.cs
- Authorization.cs
- SoapWriter.cs
- RowVisual.cs
- DetailsViewInsertedEventArgs.cs
- HTTPNotFoundHandler.cs
- IInstanceContextProvider.cs
- TextEditor.cs
- PrimitiveCodeDomSerializer.cs
- PackageRelationship.cs
- XmlWrappingWriter.cs
- FixedDocumentSequencePaginator.cs
- TreeNodeCollectionEditor.cs
- DataSourceViewSchemaConverter.cs
- ListenerElementsCollection.cs
- WindowClosedEventArgs.cs
- TextTrailingWordEllipsis.cs
- ProcessModelSection.cs
- SqlMetaData.cs
- MappedMetaModel.cs
- ValueProviderWrapper.cs
- KnownAssembliesSet.cs
- FormatterServices.cs
- AuthenticatedStream.cs
- SmiSettersStream.cs
- HiddenFieldPageStatePersister.cs
- BinHexEncoder.cs
- TableItemStyle.cs