コード例 #1
0
        private List<LocalVariableComponent> GetLocalVariableComponentList(oval_system_characteristics systemCharacteristics)
        {
            var components = new List<LocalVariableComponent>();
            var literalComponent = new LiteralComponentType() { Value = @"\" };
            var objectComponent1 = new ObjectComponentType() { object_ref = "oval:org.mitre.oval:obj:5000", item_field = "name" };
            var objectComponent2 = new ObjectComponentType() { object_ref = "oval:org.mitre.oval:obj:6000", item_field = "name" };

            var objectComponentEvaluator1 = new  LocalVariableObjectComponent(objectComponent1, systemCharacteristics);
            var literalComponentEvaluator = new LocalVariableLiteralComponent(literalComponent);
            var objectComponentEvaluator2 = new  LocalVariableObjectComponent(objectComponent2, systemCharacteristics);

            components.Add(objectComponentEvaluator1);
            components.Add(literalComponentEvaluator);
            components.Add(objectComponentEvaluator2);

            return components;
        }
コード例 #2
0
ファイル: OvalSplitBuilder.cs プロジェクト: jonaslsl/modSIC
 public OvalSplitBuilder AddObjectComponent(string objectRef, string itemField)
 {
      ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
      splitFunctionType.Item = objectComponent;
      return this;
 }
コード例 #3
0
ファイル: OvalBeginBuilder.cs プロジェクト: jonaslsl/modSIC
 public OvalBeginBuilder AddObjectComponent(string objectRef, string itemField)
 {
     ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
     beginFunction.Item = objectComponent;
     return this;
 }
コード例 #4
0
 public LocalVariableObjectComponent(ObjectComponentType objectComponent, oval_system_characteristics systemCharacteristics)
 {
     this.ObjectComponent = objectComponent;
     this.SystemCharacteristics = systemCharacteristics;
 }
コード例 #5
0
        private static VariablesTypeVariableLocal_variable CreateALocalVariable()
        {
            VariablesTypeVariableLocal_variable variable = new VariablesTypeVariableLocal_variable();
            variable.id = "oval:org.mitre.oval:var:4000";
            variable.datatype = Modulo.Collect.OVAL.Common.SimpleDatatypeEnumeration.@string;

            ObjectComponentType objecttype = new ObjectComponentType();
            objecttype.object_ref = "oval:org.mitre.oval:obj:3000";
            objecttype.item_field = "key";
            variable.Item = objecttype;
            return variable;
        }
コード例 #6
0
 public OvalRegexCaptureBuilder AddObjectComponent(string objectRef, string itemField)
 {
     ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
     this.regexCaptureFunction.Item = objectComponent;
     return this;
 }
コード例 #7
0
ファイル: OvalConcatBuilder.cs プロジェクト: ywcsz/modSIC
 public OvalConcatBuilder AddObjectComponent(string objectRef, string itemField)
 {
     ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
     this.items.Add(objectComponent);
     return this;
 }
コード例 #8
0
ファイル: OvalEndBuilder.cs プロジェクト: jonaslsl/modSIC
 public OvalEndBuilder AddObjectComponent(string objectRef, string itemField)
 {
     ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
     endFunciton.Item = objectComponent;
     return this;
 }