SetHandleAsInvalid() private method

private SetHandleAsInvalid ( ) : void
return void
コード例 #1
0
 internal static void CloseInvalidOutCriticalHandle(CriticalHandle handle)
 {
     if (handle != null)
     {
         handle.SetHandleAsInvalid();
     }
 }
コード例 #2
0
ファイル: Utility.cs プロジェクト: uQr/referencesource
        [SuppressMessage(FxCop.Category.Security, FxCop.Rule.TransparentMethodsMustNotReferenceCriticalCode)] // we got APTCA approval with no requirement to fix this transparency warning. plus, the callers of this method are not supported in partial trust.
        internal static void CloseInvalidOutCriticalHandle(CriticalHandle handle)
        {
            if (handle != null)
            {
#pragma warning disable 618
                Fx.Assert(handle.IsInvalid, "CloseInvalidOutCriticalHandle called with a valid handle!");
#pragma warning restore 618

                handle.SetHandleAsInvalid();
            }
        }