AmsiResultExtensions Class
Provides extension methods to interpret an AmsiResult.
public static class AmsiResultExtensionsMethods
| Name | Description |
|---|---|
| IsBlockedByAdmin(AmsiResult) | Determines whether an administrator policy blocked the content on this machine. |
| IsMalware(AmsiResult) | Determines whether the antimalware provider detected the content as malware. |
| ShouldBlock(AmsiResult) | Determines whether the content should be blocked, either because it is malware or because an administrator policy blocked it. |
IsBlockedByAdmin(AmsiResult)
AmsiResultExtensions.csDetermines whether an administrator policy blocked the content on this machine.
public static bool IsBlockedByAdmin(this AmsiResult result)Parameters
resultAmsiResult- The result of the scan.
Returns
bool true when an administrator policy blocked the content; otherwise, false.
IsMalware(AmsiResult)
AmsiResultExtensions.csDetermines whether the antimalware provider detected the content as malware.
public static bool IsMalware(this AmsiResult result)Parameters
resultAmsiResult- The result of the scan.
Returns
bool true when the content is considered malware; otherwise, false.
Remarks
This does not cover content blocked by administrator policy. Use AmsiResultExtensions.ShouldBlock to cover both cases.
ShouldBlock(AmsiResult)
AmsiResultExtensions.csDetermines whether the content should be blocked, either because it is malware or because an administrator policy blocked it.
public static bool ShouldBlock(this AmsiResult result)Parameters
resultAmsiResult- The result of the scan.
Returns
bool true when the content should not be used; otherwise, false.