當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。