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); }
private VariablesTypeVariableLocal_variable GetLocalVariableForRegexCaptureFunctionWithObjectComponent(string refValue, string itemFieldValue) { ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = refValue, item_field = itemFieldValue }; RegexCaptureFunctionType regexCaptureFunctionType = new RegexCaptureFunctionType() { pattern = ".", Item = objectComponent }; VariablesTypeVariableLocal_variable localVariable = new VariablesTypeVariableLocal_variable() { Item = regexCaptureFunctionType }; return localVariable; }
public OvalSubstringBuilder AddObjectComponent(string objectRef, string itemField) { ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField }; this.substringFunction.Item = objectComponent; return(this); }
public OvalArithmeticBuilder AddObjectComponent(string objectRef, string itemField) { ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField }; items.Add(objectComponent); return(this); }
public OvalEndBuilder AddObjectComponent(string objectRef, string itemField) { ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField }; endFunciton.Item = objectComponent; return(this); }
public OvalSplitBuilder AddObjectComponent(string objectRef, string itemField) { ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = objectRef, item_field = itemField }; splitFunctionType.Item = objectComponent; return(this); }
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); }
private VariablesTypeVariableLocal_variable GetLocalVariableForRegexCaptureFunctionWithObjectComponent(string refValue, string itemFieldValue) { ObjectComponentType objectComponent = new ObjectComponentType() { object_ref = refValue, item_field = itemFieldValue }; RegexCaptureFunctionType regexCaptureFunctionType = new RegexCaptureFunctionType() { pattern = ".", Item = objectComponent }; VariablesTypeVariableLocal_variable localVariable = new VariablesTypeVariableLocal_variable() { Item = regexCaptureFunctionType }; return(localVariable); }
public LocalVariableObjectComponent(ObjectComponentType objectComponent, oval_system_characteristics systemCharacteristics) { this.ObjectComponent = objectComponent; this.SystemCharacteristics = systemCharacteristics; }