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
- TypeNameConverter.cs
- PingOptions.cs
- ErrorView.xaml.cs
- IdentityReference.cs
- WindowsAuthenticationEventArgs.cs
- KoreanLunisolarCalendar.cs
- infer.cs
- DataGridViewColumnCollection.cs
- CodeDOMProvider.cs
- BinaryCommonClasses.cs
- BinaryMethodMessage.cs
- SolidColorBrush.cs
- TableLayoutSettings.cs
- EventArgs.cs
- ServiceBuildProvider.cs
- Int32Converter.cs
- DynamicILGenerator.cs
- InvalidPrinterException.cs
- QueryAsyncResult.cs
- DataBindEngine.cs
- DragEventArgs.cs
- DataGridViewCellPaintingEventArgs.cs
- SQLMoneyStorage.cs
- CalendarDay.cs
- ToolBarButton.cs
- EventLogPermission.cs
- EntitySetDataBindingList.cs
- Point3DValueSerializer.cs
- TextViewSelectionProcessor.cs
- FlowLayoutPanel.cs
- ObjectSecurityT.cs
- UidPropertyAttribute.cs
- HtmlLinkAdapter.cs
- ReturnEventArgs.cs
- CodePrimitiveExpression.cs
- ToolStripItemDataObject.cs
- PieceNameHelper.cs
- ScrollableControl.cs
- SrgsDocumentParser.cs
- FaultDescriptionCollection.cs
- Debug.cs
- GestureRecognizer.cs
- FixedSOMTable.cs
- ClientSideQueueItem.cs
- KnownBoxes.cs
- Signature.cs
- DebugHandleTracker.cs
- baseshape.cs
- ErrorProvider.cs
- ScriptBehaviorDescriptor.cs
- XPathConvert.cs
- SoapExtensionTypeElementCollection.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- OracleFactory.cs
- FormViewDeleteEventArgs.cs
- AsyncOperation.cs
- WithStatement.cs
- DecoderNLS.cs
- AutoFocusStyle.xaml.cs
- BreakRecordTable.cs
- ExecutedRoutedEventArgs.cs
- lengthconverter.cs
- COM2FontConverter.cs
- XmlChildNodes.cs
- UnhandledExceptionEventArgs.cs
- FormViewDesigner.cs
- ListBindingHelper.cs
- DeviceContext.cs
- SessionPageStateSection.cs
- ReflectPropertyDescriptor.cs
- __ConsoleStream.cs
- HorizontalAlignConverter.cs
- BaseCodeDomTreeGenerator.cs
- MultipartContentParser.cs
- ElementInit.cs
- ColumnPropertiesGroup.cs
- Parameter.cs
- ParameterReplacerVisitor.cs
- RuleSettings.cs
- ExpressionBindingsDialog.cs
- ExceptionTranslationTable.cs
- KeyedCollection.cs
- ObjectFullSpanRewriter.cs
- DispatcherSynchronizationContext.cs
- TextMarkerSource.cs
- SoapWriter.cs
- DecoderFallback.cs
- ExpressionBuilderCollection.cs
- MenuItemBinding.cs
- WebPartZone.cs
- GeneralTransform3D.cs
- SingleStorage.cs
- FileStream.cs
- MemoryMappedFileSecurity.cs
- ExecutionContext.cs
- SpnegoTokenProvider.cs
- WindowsClaimSet.cs
- ImageConverter.cs
- NamespaceExpr.cs
- TransformerTypeCollection.cs