MalwareSourceCode/MSIL/Virus/Win32/E/Virus.Win32.Expiro.w-69bb73081eac86b8cf86f45e33515d0095855636967076e2b593d7a30cd80a07/Microsoft/InfoCards/AppliesToBehaviorDecisionTable.cs
2022-08-18 06:28:56 -05:00

51 lines
2.3 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Microsoft.InfoCards.AppliesToBehaviorDecisionTable
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 516D8B44-4448-4D2C-8B8E-FFBB3FFE472B
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Expiro.w-69bb73081eac86b8cf86f45e33515d0095855636967076e2b593d7a30cd80a07.exe
using System.ServiceModel;
namespace Microsoft.InfoCards
{
internal static class AppliesToBehaviorDecisionTable
{
private static AppliesToBehaviorDecision[,] appliesToDecisionTable = new AppliesToBehaviorDecision[2, 3];
static AppliesToBehaviorDecisionTable()
{
AppliesToBehaviorDecisionTable.appliesToDecisionTable[0, 0] = AppliesToBehaviorDecision.DoNotSend;
AppliesToBehaviorDecisionTable.appliesToDecisionTable[1, 0] = AppliesToBehaviorDecision.FailMatch;
AppliesToBehaviorDecisionTable.appliesToDecisionTable[0, 1] = AppliesToBehaviorDecision.DoNotSend;
AppliesToBehaviorDecisionTable.appliesToDecisionTable[1, 1] = AppliesToBehaviorDecision.SendRPAppliesTo;
AppliesToBehaviorDecisionTable.appliesToDecisionTable[0, 2] = AppliesToBehaviorDecision.SendCustomAppliesTo;
AppliesToBehaviorDecisionTable.appliesToDecisionTable[1, 2] = AppliesToBehaviorDecision.SendRPAppliesTo;
}
private static AppliesToBehaviorDecision GetAppliesToBehaviorDecision(
InfoCardPolicy policy,
RequireAppliesToStatus requireAppliesTo,
bool considerUnrecognizedElements)
{
int index = (EndpointAddress) null == policy.PolicyAppliesTo ? 0 : 1;
if (considerUnrecognizedElements)
index = policy.NonWhiteListElementsFound ? 1 : index;
return AppliesToBehaviorDecisionTable.appliesToDecisionTable[index, (int) requireAppliesTo];
}
public static AppliesToBehaviorDecision GetAppliesToBehaviorDecisionForRst(
InfoCardPolicy policy,
RequireAppliesToStatus requireAppliesTo)
{
return AppliesToBehaviorDecisionTable.GetAppliesToBehaviorDecision(policy, requireAppliesTo, false);
}
public static AppliesToBehaviorDecision GetAppliesToBehaviorDecisionForPolicyMatch(
InfoCardPolicy policy,
RequireAppliesToStatus requireAppliesTo)
{
return AppliesToBehaviorDecisionTable.GetAppliesToBehaviorDecision(policy, requireAppliesTo, true);
}
}
}