本文整理汇总了C#中Modulo.Collect.OVAL.Definitions.variableEvaluator.VariablesEvaluated类的典型用法代码示例。如果您正苦于以下问题:C# VariablesEvaluated类的具体用法?C# VariablesEvaluated怎么用?C# VariablesEvaluated使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VariablesEvaluated类属于Modulo.Collect.OVAL.Definitions.variableEvaluator命名空间,在下文中一共展示了VariablesEvaluated类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegistryEntityVariableEvaluator
public RegistryEntityVariableEvaluator(VariablesEvaluated variablesEvaluated)
{
if (variablesEvaluated == null)
throw new ArgumentNullException("[ RegistryEntityVariableEvaluator ] - The VariableEvaluated cannot be null.");
this.variables = variablesEvaluated;
}
示例2: GetItemsToCollect
public virtual IEnumerable<ItemType> GetItemsToCollect(Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var userSIDEntity = ((user_sid55_object)objectType).GetUserSIDEntity();
var userSIDs = this.processVariables(objectType, variables);
if (userSIDs == null)
return null;
if (userSIDEntity.operation != OperationEnumeration.equals)
{
var collectedItems = ProcessOperationDifferentOfEquals(userSIDEntity.operation, userSIDs);
if (collectedItems.Count > 0)
return collectedItems;
var newUserSidItem = CreateUserSIDItemType(userSIDEntity.Value ?? "");
newUserSidItem.status = StatusEnumeration.doesnotexist;
newUserSidItem.user_sid.status = newUserSidItem.status;
return new ItemType[] { newUserSidItem };
}
var itemsToCollect = new List<ItemType>();
foreach (var userSID in userSIDs)
itemsToCollect.Add(CreateUserSIDItemType(userSID));
return itemsToCollect;
}
示例3: SetEvaluator
public SetEvaluator(oval_system_characteristics systemCharacteristics, IEnumerable<StateType> states, VariablesEvaluated variables)
{
this.systemCharacteristics = systemCharacteristics;
this.ovalDefinitionStates = states;
this.variables = variables;
this.filterEvaluator = new FilterEvaluator(this.systemCharacteristics, this.ovalDefinitionStates, this.variables);
}
示例4: GetItemsToCollect
public virtual IEnumerable<ItemType> GetItemsToCollect(Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var securityPrincipleEntity = ((accesstoken_object)objectType).GetSecurityPrincipleEntity();
var securityPrinciples = this.EvaluateVariable(objectType, variables);
securityPrinciples = this.ProcessOperation(securityPrinciples, securityPrincipleEntity);
return this.CreateItemsToCollectFromSecurityPrincipleList(securityPrinciples);
}
示例5: GetItemsToCollect
public virtual IEnumerable<ItemType> GetItemsToCollect(Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var userNames = this.processVariables(objectType, variables);
if (userNames == null)
return new List<ItemType>();
return this.ProcessOperation(((user_object)objectType).User, userNames);
}
示例6: ProcessVariableForEntity
private IEnumerable<string> ProcessVariableForEntity(
OVAL.Definitions.ObjectType sourceObject,
sql57_object_choices entityName,
VariablesEvaluated evaluatedVariables)
{
var entity = ((sql57_object)sourceObject).GetObjectEntityByName(entityName);
return new VariableEntityEvaluator(evaluatedVariables).EvaluateVariableForEntity(entity);
}
示例7: UserSID55EntityVariableEvaluator
public UserSID55EntityVariableEvaluator(ObjectType objectType, VariablesEvaluated variablesEvaluated)
: base(objectType, variablesEvaluated)
{
this.checkObjectType(objectType);
base.AllObjectEntities = new Dictionary<string, EntityObjectStringType>();
base.AllObjectEntities.Add("user_sid", ((user_sid55_object)objectType).UserSID);
}
示例8: RegKeyEffectiveRightsVariableEvaluator
public RegKeyEffectiveRightsVariableEvaluator(ObjectType objectType, VariablesEvaluated variablesEvaluated)
: base(objectType, variablesEvaluated)
{
if (!(objectType is regkeyeffectiverights53_object))
throw new Exception(string.Format("[RegKeyEffectiveRightsVariableEvaluator] - The type of object is invalid: '{0}'.", objectType.ToString()));
base.AllObjectEntities = ((regkeyeffectiverights53_object)objectType).GetAllObjectEntities();
}
示例9: UserEntityVariableEvaluator
public UserEntityVariableEvaluator(ObjectType objectType, VariablesEvaluated variablesEvaluated)
: base(objectType, variablesEvaluated)
{
if (!(objectType is user_object))
throw new Exception(string.Format("[UserEntityVariableEvaluator] - The type of object is invalid: '{0}'.", objectType.ToString()));
base.AllObjectEntities = new Dictionary<string, EntityObjectStringType>();
base.AllObjectEntities.Add("user", ((user_object)objectType).User);
}
示例10: SID_SID_EntityVariableEvaluator
public SID_SID_EntityVariableEvaluator(ObjectType objectType, VariablesEvaluated variablesEvaluated)
: base(objectType, variablesEvaluated)
{
if (!(objectType is sid_sid_object))
throw new Exception(string.Format("[SID_SID_EntityVariableEvaluator] - The type of object is invalid: '{0}'.", objectType.ToString()));
base.AllObjectEntities = new Dictionary<string, EntityObjectStringType>();
base.AllObjectEntities.Add("trustee_sid", ((sid_sid_object)objectType).TrusteeSID);
}
示例11: GetItemsToCollect
/// <summary>
/// this method returns the item_types to collect.
/// </summary>
/// <param name="objectType">Type of the object.</param>
/// <returns></returns>
public virtual IEnumerable<ItemType> GetItemsToCollect(Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var variableEvaluator = new RegistryEntityVariableEvaluator(variables);
var operationEvaluator = new RegistryEntityOperationEvaluator(this.SystemDataSource, this.WmiDataProvider);
var registryObjectsVariableProcessed = variableEvaluator.ProcessVariableForRegistryObject((registry_object)objectType);
var registryObjectsOperationProcessed = operationEvaluator.ProcessOperation(registryObjectsVariableProcessed);
return registryObjectsOperationProcessed;
}
示例12: EvaluateVariable
private IList<string> EvaluateVariable(Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var securityPrincipleEntity = ((accesstoken_object)objectType).GetSecurityPrincipleEntity();
if (string.IsNullOrEmpty(securityPrincipleEntity.var_ref))
return new List<String>(new string[] { securityPrincipleEntity.Value });
var variableEvaluator = new AccessTokenVariableEvaluator(objectType, variables);
var result = variableEvaluator.ProcessVariableForAllObjectEntities();
return (result == null) ? new string[] { }.ToList() : result.ToList();
}
示例13: processVariables
private IEnumerable<String> processVariables(Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var userEntityValue = ((user_object)objectType).User.Value;
if (variables == null || variables.VariableValues.IsEmpty())
return new string[] { userEntityValue };
return
new UserEntityVariableEvaluator(objectType, variables)
.ProcessVariableForAllObjectEntities();
}
示例14: GetItemsToCollect
public IEnumerable<ItemType> GetItemsToCollect(OVAL.Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var trusteeNames = this.processVariables(objectType, variables);
if (trusteeNames == null)
return new List<ItemType>();
var derivedTrusteeNames = this.processOperation(objectType, trusteeNames.ToArray());
return this.createSidItemsToCollect(derivedTrusteeNames.ToList());
}
示例15: GetItemsToCollect
public IEnumerable<ItemType> GetItemsToCollect(Definitions.ObjectType objectType, VariablesEvaluated variables)
{
var groupNames = this.processVariables(objectType, variables);
if (groupNames == null)
return new List<ItemType>();
var derivedGroupNames = this.processOperation(objectType, groupNames.ToArray());
return this.createGroupItemsToCollect(derivedGroupNames.ToList());
}