Esempio n. 1
0
 protected override void Analyze(ToolComponentReference toolComponentReference, string toolComponentReferencePointer)
 {
     ValidateArrayIndex(
         toolComponentReference.Index,
         Context.CurrentRun.Tool.Extensions,
         toolComponentReferencePointer,
         "toolComponentReference",
         SarifPropertyName.Index,
         $"runs[{Context.CurrentRunIndex}].tool.extensions");
 }
Esempio n. 2
0
            public ToolComponentReferenceTestCase(int index, string toolGuid, string driverGuid, bool expectedOutput)
            {
                ToolComponentReference = new ToolComponentReference
                {
                    Index = index,
                    Guid  = toolGuid
                };

                DriverGuid     = driverGuid;
                ExpectedOutput = expectedOutput;
            }
Esempio n. 3
0
        public static bool RefersToDriver(this ToolComponentReference toolComponent, string driverGuid)
        {
            if (toolComponent.Index == -1)
            {
                if (toolComponent.Guid == null)
                {
                    return(true);
                }
                else
                {
                    return(toolComponent.Guid.Equals(driverGuid, StringComparison.OrdinalIgnoreCase));
                }
            }

            return(false);
        }
 protected virtual void Analyze(ToolComponentReference toolComponentReference, string toolComponentReferencePointer)
 {
 }
 private void Visit(ToolComponentReference toolComponentReference, string toolComponentReferencePointer)
 {
     Analyze(toolComponentReference, toolComponentReferencePointer);
 }