Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / ImpersonateTokenRef.cs / 1 / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeAttributeArgumentCollection.cs
- SharedDp.cs
- basevalidator.cs
- InvalidOleVariantTypeException.cs
- EntityKey.cs
- DecoderFallbackWithFailureFlag.cs
- DrawingGroup.cs
- ConfigurationSectionCollection.cs
- ConfigXmlComment.cs
- WebPartConnection.cs
- ScrollItemProviderWrapper.cs
- WindowsListViewItemCheckBox.cs
- DrawingServices.cs
- XmlException.cs
- DefaultProxySection.cs
- BordersPage.cs
- XmlUtil.cs
- SqlInternalConnectionTds.cs
- DragSelectionMessageFilter.cs
- CursorEditor.cs
- Tuple.cs
- RC2CryptoServiceProvider.cs
- AnimationClockResource.cs
- SQlBooleanStorage.cs
- EpmAttributeNameBuilder.cs
- dsa.cs
- Baml2006ReaderFrame.cs
- WorkflowServiceHost.cs
- WebPart.cs
- AnnotationResource.cs
- RowsCopiedEventArgs.cs
- MailBnfHelper.cs
- Point3DCollection.cs
- SchemaTypeEmitter.cs
- LinkedList.cs
- BrowserDefinition.cs
- CategoryGridEntry.cs
- PackWebRequest.cs
- SafeCertificateStore.cs
- ApplicationServicesHostFactory.cs
- Math.cs
- ButtonChrome.cs
- RelationshipFixer.cs
- FunctionDescription.cs
- TTSEngineProxy.cs
- ConfigXmlWhitespace.cs
- StreamWriter.cs
- StringCollectionEditor.cs
- SourceFileInfo.cs
- Calendar.cs
- Utilities.cs
- ErrorEventArgs.cs
- WorkflowTransactionService.cs
- EditorAttribute.cs
- RootBrowserWindowProxy.cs
- DataTableExtensions.cs
- ProcessHostConfigUtils.cs
- PropertiesTab.cs
- CircleHotSpot.cs
- CompilerGlobalScopeAttribute.cs
- Typeface.cs
- ControlAdapter.cs
- Compiler.cs
- ViewGenerator.cs
- CorrelationTokenTypeConvertor.cs
- NumberFormatInfo.cs
- DescendentsWalker.cs
- CommonObjectSecurity.cs
- XmlSchemaObject.cs
- PageCodeDomTreeGenerator.cs
- RequiredAttributeAttribute.cs
- ExecutionEngineException.cs
- XmlAttributeOverrides.cs
- Context.cs
- DirectoryObjectSecurity.cs
- FixedBufferAttribute.cs
- BamlLocalizableResource.cs
- BufferedGraphicsContext.cs
- CompModSwitches.cs
- DataGridViewTextBoxEditingControl.cs
- ServiceBusyException.cs
- DeviceContext.cs
- OpenFileDialog.cs
- BindingCompleteEventArgs.cs
- RoleServiceManager.cs
- SuppressIldasmAttribute.cs
- TextRunProperties.cs
- DefaultCompensation.cs
- FeatureSupport.cs
- HttpCookie.cs
- Columns.cs
- WebCategoryAttribute.cs
- ImageSource.cs
- PointHitTestResult.cs
- OperationInfo.cs
- RegistryPermission.cs
- ErrorStyle.cs
- DataGridComponentEditor.cs
- DuplicateWaitObjectException.cs
- ValueTypeFixupInfo.cs