Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / ImpersonateTokenRef.cs / 1305376 / ImpersonateTokenRef.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.Web.Util; using System.Web.Configuration; // class IdentitySection internal sealed class ImpersonateTokenRef : IDisposable { private IntPtr _handle; internal ImpersonateTokenRef(IntPtr token) { _handle = token; } internal IntPtr Handle { get { return _handle; } } // The handle can be kept alive by HttpContext.s_appIdentityConfig (see ASURT#121815) ~ImpersonateTokenRef() { if (_handle != IntPtr.Zero) { UnsafeNativeMethods.CloseHandle(_handle); _handle = IntPtr.Zero; } } void IDisposable.Dispose() { if (_handle != IntPtr.Zero) { UnsafeNativeMethods.CloseHandle(_handle); _handle = IntPtr.Zero; } GC.SuppressFinalize(this); } } } // 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
- EventManager.cs
- FixedTextView.cs
- DynamicPhysicalDiscoSearcher.cs
- FormsAuthenticationConfiguration.cs
- RegexParser.cs
- RefreshPropertiesAttribute.cs
- KeyValueInternalCollection.cs
- LogPolicy.cs
- ActivityUtilities.cs
- TiffBitmapEncoder.cs
- PointAnimationClockResource.cs
- QilFactory.cs
- MobileUserControl.cs
- AutoResizedEvent.cs
- UInt64.cs
- CLSCompliantAttribute.cs
- HttpRuntime.cs
- InkCanvasAutomationPeer.cs
- ColumnResizeAdorner.cs
- TextEncodedRawTextWriter.cs
- BatchParser.cs
- ListViewHitTestInfo.cs
- tibetanshape.cs
- ScrollItemPatternIdentifiers.cs
- ContentElement.cs
- EnumerableCollectionView.cs
- BridgeDataReader.cs
- XamlToRtfParser.cs
- ConfigUtil.cs
- SystemResources.cs
- X509SecurityTokenParameters.cs
- CodeGenerator.cs
- DockPattern.cs
- columnmapkeybuilder.cs
- MultiPropertyDescriptorGridEntry.cs
- RequestUriProcessor.cs
- FtpRequestCacheValidator.cs
- RequestTimeoutManager.cs
- HwndHostAutomationPeer.cs
- UserNamePasswordValidator.cs
- SqlDataSourceCache.cs
- LateBoundBitmapDecoder.cs
- MatrixTransform.cs
- _HeaderInfo.cs
- HttpGetProtocolReflector.cs
- RangeValidator.cs
- ArgIterator.cs
- SqlFileStream.cs
- DataGridViewCheckBoxCell.cs
- BitFlagsGenerator.cs
- Message.cs
- JsonByteArrayDataContract.cs
- Calendar.cs
- __ConsoleStream.cs
- SafeSecurityHelper.cs
- GroupBox.cs
- PartialTrustValidationBehavior.cs
- GridEntry.cs
- StreamInfo.cs
- WebPartConnectionCollection.cs
- DataSourceSelectArguments.cs
- RowsCopiedEventArgs.cs
- DataConnectionHelper.cs
- ObjectSpanRewriter.cs
- HostingEnvironmentException.cs
- SqlErrorCollection.cs
- regiisutil.cs
- WindowHideOrCloseTracker.cs
- XamlLoadErrorInfo.cs
- SecurityContext.cs
- ShortcutKeysEditor.cs
- DataTableReaderListener.cs
- BitFlagsGenerator.cs
- NamespaceInfo.cs
- IProducerConsumerCollection.cs
- DataServiceExpressionVisitor.cs
- StandardOleMarshalObject.cs
- LogLogRecordHeader.cs
- UpdateProgress.cs
- XmlEventCache.cs
- TrustManager.cs
- EditingMode.cs
- CleanUpVirtualizedItemEventArgs.cs
- SqlProviderServices.cs
- TrustLevelCollection.cs
- CodeSubDirectory.cs
- LabelTarget.cs
- Point.cs
- LinearGradientBrush.cs
- SpecialFolderEnumConverter.cs
- SafeLibraryHandle.cs
- WebControlsSection.cs
- Certificate.cs
- RegexCharClass.cs
- ScaleTransform.cs
- PointAnimationClockResource.cs
- DebuggerAttributes.cs
- Condition.cs
- StoreItemCollection.cs
- OciEnlistContext.cs