• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# variableEvaluator.VariablesEvaluated类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Modulo.Collect.OVAL.Definitions.variableEvaluator.VariablesEvaluated的典型用法代码示例。如果您正苦于以下问题:C# VariablesEvaluated类的具体用法?C# VariablesEvaluated怎么用?C# VariablesEvaluated使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



VariablesEvaluated类属于Modulo.Collect.OVAL.Definitions.variableEvaluator命名空间,在下文中一共展示了VariablesEvaluated类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: Should_not_possible_to_evaluate_variables_that_has_multiples_values

        public void Should_not_possible_to_evaluate_variables_that_has_multiples_values()
        {
            List<string> values = new List<string>() { "1.0","1.1","1.2" };
            VariableValue variable = new VariableValue("oval:org.mitre.oval:obj:3000", "oval:org.mitre.oval:var:3000", values);
            VariablesEvaluated variables = new VariablesEvaluated(new List<VariableValue>() { variable });
            ItemType itemType = this.systemCharacteristics.GetSystemDataByReferenceId("3");
            StateType state = this.states.Where(obj => obj.id == "oval:org.mitre.oval:ste:100").SingleOrDefault();
            StateTypeComparator comparator = new StateTypeComparator(state, itemType, variables);
            comparator.IsEquals();

        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:11,代码来源:StateTypeComparatorTest.cs


示例17: GetItemsToCollect

        public IEnumerable<OVAL.SystemCharacteristics.ItemType> GetItemsToCollect(OVAL.Definitions.ObjectType objectType, VariablesEvaluated variables)
        {
            var showSubcommandEntity = ((line_object)objectType).GetShowSubcommandEntity();
            var showSubcommandValues = 
                new VariableEntityEvaluator(variables)
                    .EvaluateVariableForEntity(showSubcommandEntity);

            return 
                showSubcommandValues
                    .Select(v =>
                        new line_item() { show_subcommand = new EntityItemStringType() { Value = v } });
        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:12,代码来源:LineItemTypeGenerator.cs


示例18: Should_be_possible_to_get_a_variable_by_ovalComponentId

        public void Should_be_possible_to_get_a_variable_by_ovalComponentId()
        {
            List<string> variableValues = new List<string>() { "Multiprocessor Free" };
            VariableValue variable = new VariableValue("oval:org.mitre.oval:obj:6000", "oval:com.hp:var:1", variableValues);
            IEnumerable<VariableValue> variables = new List<VariableValue>() { variable };
            VariablesEvaluated variablesEvaluated = new VariablesEvaluated(variables);

            IEnumerable<VariableValue> variablesExpected = variablesEvaluated.GetVariableValueForOvalComponent("oval:org.mitre.oval:obj:6000");
            Assert.IsNotNull(variablesExpected, "the variable was not found");
            variablesExpected = variablesEvaluated.GetVariableValueForOvalComponent("oval:org.mitre.oval:obj:6005");
            Assert.IsTrue(variablesExpected.Count() == 0, "the variable is not expected");
        }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:12,代码来源:VariablesEvaluatedTest.cs


示例19: CreateFakeCollectInfo

        public static CollectInfo CreateFakeCollectInfo(
            IEnumerable<Definitions.ObjectType> objects, 
            VariablesEvaluated variables = null, 
            oval_system_characteristics systemCharacteristics = null)
        {
            CollectInfo collectInfo = new CollectInfo();
            collectInfo.Variables = (variables == null) ? new VariablesEvaluated(new List<VariableValue>()) : variables;
            collectInfo.ObjectTypes = objects;
            collectInfo.SystemCharacteristics = systemCharacteristics;

            return collectInfo;
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:12,代码来源:ProbeHelper.cs


示例20: GetItemsToCollect

        public virtual IEnumerable<ItemType> GetItemsToCollect(Definitions.ObjectType objectType, VariablesEvaluated variables)
        {
            var fileEffectiveRights53Object = (fileeffectiverights53_object)objectType;

            if (fileEffectiveRights53Object.HasVariableDefined())
            {
                var objectTypes = new FileEffectiveRights53EntityVariableEvaluator(variables).ProcessVariables(objectType);
                return this.OperationEvaluator.ProcessOperation(objectTypes).ToList();
            }

            return OperationEvaluator.ProcessOperation(fileEffectiveRights53Object).ToList();
        }
开发者ID:ywcsz,项目名称:modSIC,代码行数:12,代码来源:FileEffectiveRights53ItemTypeGenerator.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CSharp.LocalVariableReference类代码示例发布时间:2022-05-26
下一篇:
C# Models.User类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap