Example #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;
        }
Example #2
0
 public OvalSplitBuilder AddObjectComponent(string objectRef, string itemField)
 {
      ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
      splitFunctionType.Item = objectComponent;
      return this;
 }
Example #3
0
 public OvalBeginBuilder AddObjectComponent(string objectRef, string itemField)
 {
     ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
     beginFunction.Item = objectComponent;
     return this;
 }
 public LocalVariableObjectComponent(ObjectComponentType objectComponent, oval_system_characteristics systemCharacteristics)
 {
     this.ObjectComponent = objectComponent;
     this.SystemCharacteristics = systemCharacteristics;
 }
        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;
        }
Example #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;
 }
Example #7
0
 public OvalConcatBuilder AddObjectComponent(string objectRef, string itemField)
 {
     ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
     this.items.Add(objectComponent);
     return this;
 }
Example #8
0
 public OvalEndBuilder AddObjectComponent(string objectRef, string itemField)
 {
     ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField };
     endFunciton.Item = objectComponent;
     return this;
 }