Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DependencyPropertyConverter.cs
- ClientUrlResolverWrapper.cs
- ApplicationHost.cs
- OperationCanceledException.cs
- SecurityTokenValidationException.cs
- sqlpipe.cs
- _SslSessionsCache.cs
- DynamicILGenerator.cs
- SerializationInfo.cs
- AddDataControlFieldDialog.cs
- WebHeaderCollection.cs
- ToolStripItemCollection.cs
- HandlerBase.cs
- SQLBoolean.cs
- FileSystemEventArgs.cs
- ExpressionBinding.cs
- SettingsPropertyNotFoundException.cs
- MenuItemCollection.cs
- RuntimeCompatibilityAttribute.cs
- SqlInfoMessageEvent.cs
- ClonableStack.cs
- SerializationIncompleteException.cs
- _NetRes.cs
- SubpageParagraph.cs
- XhtmlTextWriter.cs
- FileDialogCustomPlacesCollection.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- TemplatePartAttribute.cs
- HtmlMeta.cs
- TiffBitmapDecoder.cs
- Annotation.cs
- PagePropertiesChangingEventArgs.cs
- ComplexPropertyEntry.cs
- StylusEditingBehavior.cs
- ActivationServices.cs
- SweepDirectionValidation.cs
- HttpClientCertificate.cs
- ListViewItem.cs
- DeflateStream.cs
- AssemblyHash.cs
- BitmapEffectCollection.cs
- HyperLinkStyle.cs
- CompilerWrapper.cs
- ElementAction.cs
- OdbcError.cs
- ProgressBarAutomationPeer.cs
- JoinTreeNode.cs
- RectangleGeometry.cs
- ControlPropertyNameConverter.cs
- CollectionBuilder.cs
- HtmlTable.cs
- PropertyChangeTracker.cs
- ClientRoleProvider.cs
- CrossAppDomainChannel.cs
- XmlSignificantWhitespace.cs
- ItemAutomationPeer.cs
- FontDifferentiator.cs
- XmlSchemaDatatype.cs
- Buffer.cs
- BackgroundFormatInfo.cs
- BamlLocalizableResourceKey.cs
- MimeFormImporter.cs
- BaseDataList.cs
- RangeValidator.cs
- ImageList.cs
- WebPartManager.cs
- TextOutput.cs
- ActivityCollectionMarkupSerializer.cs
- DrawingState.cs
- ValidationPropertyAttribute.cs
- WindowsEditBoxRange.cs
- _DisconnectOverlappedAsyncResult.cs
- InputMethodStateTypeInfo.cs
- RenderTargetBitmap.cs
- PresentationAppDomainManager.cs
- processwaithandle.cs
- KeyValuePair.cs
- HtmlListAdapter.cs
- TracedNativeMethods.cs
- IPAddress.cs
- XamlToRtfParser.cs
- DtrList.cs
- DataExchangeServiceBinder.cs
- URI.cs
- PropertyInfoSet.cs
- MdiWindowListStrip.cs
- TypeInitializationException.cs
- InvokePatternIdentifiers.cs
- SortAction.cs
- KoreanCalendar.cs
- DesignTimeSiteMapProvider.cs
- Annotation.cs
- IISMapPath.cs
- WorkflowMarkupSerializationProvider.cs
- HostingEnvironmentWrapper.cs
- Solver.cs
- ComMethodElement.cs
- LogLogRecord.cs
- AdornerPresentationContext.cs
- XmlSignificantWhitespace.cs