More ReliabilityContracts for finalizer code.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.ConstrainedExecution;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ namespace NSspi.Contexts
|
|||||||
: base()
|
: base()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )]
|
||||||
protected override bool ReleaseHandle()
|
protected override bool ReleaseHandle()
|
||||||
{
|
{
|
||||||
SecurityStatus status = ContextNativeMethods.DeleteSecurityContext(
|
SecurityStatus status = ContextNativeMethods.DeleteSecurityContext(
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.ConstrainedExecution;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ namespace NSspi.Credentials
|
|||||||
: base()
|
: base()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )]
|
||||||
protected override bool ReleaseHandle()
|
protected override bool ReleaseHandle()
|
||||||
{
|
{
|
||||||
SecurityStatus status = CredentialNativeMethods.FreeCredentialsHandle(
|
SecurityStatus status = CredentialNativeMethods.FreeCredentialsHandle(
|
||||||
|
|||||||
Reference in New Issue
Block a user