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
- WindowsEditBoxRange.cs
- ControlAdapter.cs
- StrokeCollectionConverter.cs
- Automation.cs
- Translator.cs
- ResourceContainer.cs
- ApplicationServiceHelper.cs
- login.cs
- DecimalAnimation.cs
- SafeMemoryMappedViewHandle.cs
- Point3DCollection.cs
- StreamFormatter.cs
- InstanceData.cs
- CompareValidator.cs
- XmlSchemaSimpleContentExtension.cs
- WpfSharedBamlSchemaContext.cs
- ExtractCollection.cs
- SimpleLine.cs
- DependencyPropertyHelper.cs
- ContextQuery.cs
- DeferredTextReference.cs
- IndexerNameAttribute.cs
- SoapExtension.cs
- PolygonHotSpot.cs
- EntryPointNotFoundException.cs
- ComponentResourceKey.cs
- SoapHeaderException.cs
- Row.cs
- MSAANativeProvider.cs
- TypeBrowser.xaml.cs
- XmlSchemaSimpleContentExtension.cs
- WebServiceTypeData.cs
- ResolveCriteriaCD1.cs
- ResourceExpressionBuilder.cs
- ProcessManager.cs
- WebPartZoneBase.cs
- SqlDataSourceView.cs
- TargetConverter.cs
- ExceptionUtil.cs
- DataFormats.cs
- Model3DCollection.cs
- SymbolDocumentGenerator.cs
- QualifiedCellIdBoolean.cs
- __Filters.cs
- BitHelper.cs
- GridViewCellAutomationPeer.cs
- ImageMetadata.cs
- TogglePattern.cs
- MimeTypeMapper.cs
- DbConnectionPoolIdentity.cs
- NameValueSectionHandler.cs
- IChannel.cs
- MultiBindingExpression.cs
- XamlTypeMapper.cs
- FixedSOMContainer.cs
- DoubleKeyFrameCollection.cs
- SiteMapSection.cs
- HttpResponse.cs
- SqlDataSourceSelectingEventArgs.cs
- StdValidatorsAndConverters.cs
- BamlStream.cs
- DisplayInformation.cs
- RelOps.cs
- CacheChildrenQuery.cs
- GridViewSortEventArgs.cs
- CharKeyFrameCollection.cs
- LogicalExpr.cs
- GenericAuthenticationEventArgs.cs
- AsyncResult.cs
- MD5Cng.cs
- Fx.cs
- _Rfc2616CacheValidators.cs
- ObjectListSelectEventArgs.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- OrderPreservingMergeHelper.cs
- BitmapEffectState.cs
- EdmTypeAttribute.cs
- ObjectStorage.cs
- ConstraintEnumerator.cs
- StateRuntime.cs
- ContractInstanceProvider.cs
- Stacktrace.cs
- LingerOption.cs
- RegexMatchCollection.cs
- XsltContext.cs
- UnsettableComboBox.cs
- SolidBrush.cs
- DiagnosticSection.cs
- XmlName.cs
- ToolboxItemFilterAttribute.cs
- MatrixAnimationUsingKeyFrames.cs
- ObjectNavigationPropertyMapping.cs
- smtpconnection.cs
- SecurityHelper.cs
- XmlCharType.cs
- log.cs
- WebPartConnectionCollection.cs
- HtmlLink.cs
- CodeCompileUnit.cs
- TextBoxBase.cs