More ReliabilityContracts for finalizer code.

This commit is contained in:
antiduh
2014-06-30 15:17:51 +00:00
parent 798d6be4ad
commit 9d0403ead6
2 changed files with 4 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Text;
using System.Threading.Tasks;
@@ -13,6 +14,7 @@ namespace NSspi.Contexts
: base()
{ }
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )]
protected override bool ReleaseHandle()
{
SecurityStatus status = ContextNativeMethods.DeleteSecurityContext(

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Text;
using System.Threading.Tasks;
@@ -13,6 +14,7 @@ namespace NSspi.Credentials
: base()
{ }
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )]
protected override bool ReleaseHandle()
{
SecurityStatus status = CredentialNativeMethods.FreeCredentialsHandle(