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
- DesignSurfaceCollection.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- AuthenticationModulesSection.cs
- Button.cs
- contentDescriptor.cs
- OracleTimeSpan.cs
- RepeaterItemEventArgs.cs
- EdmProviderManifest.cs
- ZoneButton.cs
- FormViewInsertEventArgs.cs
- TreeNodeBindingCollection.cs
- X509SecurityTokenAuthenticator.cs
- CryptoApi.cs
- WebPageTraceListener.cs
- TemplateBindingExtensionConverter.cs
- ShapingEngine.cs
- OdbcDataReader.cs
- prompt.cs
- TextFormatterImp.cs
- PageCodeDomTreeGenerator.cs
- XmlAtomicValue.cs
- KeyPressEvent.cs
- StylusCaptureWithinProperty.cs
- DataServiceRequestArgs.cs
- SmiGettersStream.cs
- RuntimeHelpers.cs
- HtmlCalendarAdapter.cs
- HttpClientCertificate.cs
- OletxVolatileEnlistment.cs
- _CookieModule.cs
- TypeUtil.cs
- AncillaryOps.cs
- CodeCastExpression.cs
- Panel.cs
- HttpResponseWrapper.cs
- FontEmbeddingManager.cs
- InfoCardTraceRecord.cs
- DoubleStorage.cs
- Int64AnimationUsingKeyFrames.cs
- ActiveXHelper.cs
- BookmarkList.cs
- SizeAnimationBase.cs
- TagPrefixAttribute.cs
- smtpconnection.cs
- HtmlDocument.cs
- ChameleonKey.cs
- SecurityTokenRequirement.cs
- SizeF.cs
- BmpBitmapEncoder.cs
- ScriptControlManager.cs
- ISAPIWorkerRequest.cs
- NonClientArea.cs
- ZipQueryOperator.cs
- DataException.cs
- ContractReference.cs
- StickyNoteHelper.cs
- OdbcError.cs
- MetadataArtifactLoader.cs
- GroupLabel.cs
- DataErrorValidationRule.cs
- XmlNamedNodeMap.cs
- CachedFontFamily.cs
- SaveWorkflowCommand.cs
- BooleanAnimationBase.cs
- SequentialUshortCollection.cs
- Opcode.cs
- CodeBlockBuilder.cs
- XmlSchemaInferenceException.cs
- XmlSchemaException.cs
- Point4DConverter.cs
- XmlSerializationReader.cs
- IncomingWebRequestContext.cs
- RangeValidator.cs
- ServiceHttpModule.cs
- CompositeTypefaceMetrics.cs
- CodeCommentStatementCollection.cs
- DesignerDataColumn.cs
- FastEncoder.cs
- ReadOnlyHierarchicalDataSourceView.cs
- InputScopeNameConverter.cs
- CompositeFontInfo.cs
- XmlSchemaSubstitutionGroup.cs
- PartitionedDataSource.cs
- WeakRefEnumerator.cs
- RotateTransform3D.cs
- PermissionSetTriple.cs
- Int32CAMarshaler.cs
- TreeNodeConverter.cs
- VoiceObjectToken.cs
- ConnectionManagementSection.cs
- LicenseContext.cs
- BitmapEffectDrawingContextState.cs
- TextDecorations.cs
- ElementMarkupObject.cs
- WaveHeader.cs
- RoleManagerModule.cs
- GraphicsContainer.cs
- Constants.cs
- PagesSection.cs
- SyndicationDeserializer.cs