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
- EdmConstants.cs
- DataGridViewCheckBoxCell.cs
- TimeIntervalCollection.cs
- Hashtable.cs
- DataGridTable.cs
- ContextStack.cs
- Lease.cs
- PageContent.cs
- DecimalStorage.cs
- DataGridViewRowsAddedEventArgs.cs
- Timeline.cs
- RightsManagementInformation.cs
- Parallel.cs
- TypeSystemHelpers.cs
- FixedPosition.cs
- GridViewDeleteEventArgs.cs
- ReplacementText.cs
- OutputScopeManager.cs
- Schema.cs
- WsatServiceAddress.cs
- PropertyGridEditorPart.cs
- VerificationException.cs
- COM2IDispatchConverter.cs
- EntityContainerEmitter.cs
- Select.cs
- LayoutSettings.cs
- TimeZoneInfo.cs
- FormatVersion.cs
- WorkflowWebHostingModule.cs
- ProgressBar.cs
- EnterpriseServicesHelper.cs
- EmptyElement.cs
- SchemaNotation.cs
- ComAdminInterfaces.cs
- SimpleBitVector32.cs
- TemplateKeyConverter.cs
- BlurEffect.cs
- ExpressionNode.cs
- CharacterBufferReference.cs
- CompiledXpathExpr.cs
- SimplePropertyEntry.cs
- SynchronizationFilter.cs
- GestureRecognitionResult.cs
- sqlstateclientmanager.cs
- CompositeKey.cs
- ExponentialEase.cs
- Gdiplus.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- ScriptManager.cs
- ObjectDataSourceMethodEventArgs.cs
- PersistChildrenAttribute.cs
- MSHTMLHostUtil.cs
- ChildDocumentBlock.cs
- ObjectDataSourceSelectingEventArgs.cs
- ObjectDataSource.cs
- StorageMappingItemCollection.cs
- MimeBasePart.cs
- RoleServiceManager.cs
- FontCacheLogic.cs
- DesignerListAdapter.cs
- DockProviderWrapper.cs
- XmlKeywords.cs
- ScriptingProfileServiceSection.cs
- CustomErrorsSection.cs
- Ops.cs
- TransformProviderWrapper.cs
- While.cs
- WhitespaceRuleReader.cs
- ServiceContractViewControl.cs
- SiteMapNodeItemEventArgs.cs
- EncoderParameter.cs
- SchemaImporterExtensionsSection.cs
- NameObjectCollectionBase.cs
- FontFamilyIdentifier.cs
- Camera.cs
- datacache.cs
- InvokeSchedule.cs
- ProcessModelSection.cs
- StrokeNodeData.cs
- TranslateTransform3D.cs
- ContainerAction.cs
- StackBuilderSink.cs
- AssociationProvider.cs
- XmlUtilWriter.cs
- EdmError.cs
- ContextStack.cs
- ProviderCommandInfoUtils.cs
- ControlIdConverter.cs
- Visual.cs
- HttpListenerResponse.cs
- StorageAssociationSetMapping.cs
- RequestReplyCorrelator.cs
- PreviewPageInfo.cs
- dataprotectionpermissionattribute.cs
- LineProperties.cs
- TdsParserStaticMethods.cs
- TextCharacters.cs
- CollectionChangedEventManager.cs
- VisualTreeHelper.cs
- EntityDataSourceConfigureObjectContext.cs