コード例 #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");
 }
コード例 #2
0
            public ToolComponentReferenceTestCase(int index, string toolGuid, string driverGuid, bool expectedOutput)
            {
                ToolComponentReference = new ToolComponentReference
                {
                    Index = index,
                    Guid  = toolGuid
                };

                DriverGuid     = driverGuid;
                ExpectedOutput = expectedOutput;
            }
コード例 #3
0
ファイル: Extensions.cs プロジェクト: tosmolka/sarif-sdk
        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);
        }
コード例 #4
0
 protected virtual void Analyze(ToolComponentReference toolComponentReference, string toolComponentReferencePointer)
 {
 }
コード例 #5
0
 private void Visit(ToolComponentReference toolComponentReference, string toolComponentReferencePointer)
 {
     Analyze(toolComponentReference, toolComponentReferencePointer);
 }