当前位置: 首页>>代码示例>>C#>>正文


C# variableEvaluator.VariablesEvaluated类代码示例

本文整理汇总了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;
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:7,代码来源:RegistryEntityVariableEvaluator.cs

示例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;
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:26,代码来源:UserSID55ItemTypeGenerator.cs

示例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);
 }
开发者ID:ywcsz,项目名称:modSIC,代码行数:7,代码来源:SetEvaluator.cs

示例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);
        }
开发者ID:JorgeHudson,项目名称:modSIC,代码行数:8,代码来源:AccessTokenItemTypeGenerator.cs

示例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);
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:8,代码来源:UserItemTypeGenerator.cs

示例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);
 }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:8,代码来源:Sql57ItemTypeGenerator.cs

示例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);
        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:8,代码来源:UserSID55EntityVariableEvaluator.cs

示例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();
        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:8,代码来源:RegKeyEffectiveRightsVariableEvaluator.cs

示例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);
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:9,代码来源:UserEntityVariableEvaluator.cs

示例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);
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:9,代码来源:SID_SID_EntityVariableEvaluator.cs

示例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;
        }        
开发者ID:jonaslsl,项目名称:modSIC,代码行数:15,代码来源:RegistryItemTypeGenerator.cs

示例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();
        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:10,代码来源:AccessTokenItemTypeGenerator.cs

示例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();
        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:10,代码来源:UserItemTypeGenerator.cs

示例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());
        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:10,代码来源:SIDItemTypeGenerator.cs

示例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());
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:10,代码来源:GroupItemTypeGenerator.cs


注:本文中的Modulo.Collect.OVAL.Definitions.variableEvaluator.VariablesEvaluated类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。