예제 #1
0
 internal CompilerEmitStreamProvider(CommonCompiler compiler, string filePath, bool streamCreatedByNativePdbWriter)
 {
     _compiler = compiler;
     _filePath = filePath;
     _streamCreatedByNativePdbWriter = streamCreatedByNativePdbWriter;
     _lazyStream = s_uninitialized;
 }
예제 #2
0
        public AdditionalTextFile(CommandLineSourceFile sourceFile, CommonCompiler compiler)
        {
            if (compiler == null)
            {
                throw new ArgumentNullException(nameof(compiler));
            }

            _sourceFile  = sourceFile;
            _compiler    = compiler;
            _diagnostics = SpecializedCollections.EmptyList <DiagnosticInfo>();
        }
예제 #3
0
        public AdditionalTextFile(CommandLineSourceFile sourceFile, CommonCompiler compiler)
        {
            if (compiler == null)
            {
                throw new ArgumentNullException(nameof(compiler));
            }

            _sourceFile = sourceFile;
            _compiler = compiler;
            _diagnostics = SpecializedCollections.EmptyList<DiagnosticInfo>();
        }
예제 #4
0
        internal static string GetExpectedErrorLogHeader(string actualOutput, CommonCompiler compiler)
        {
            var expectedToolName       = compiler.GetToolName();
            var expectedProductVersion = compiler.GetAssemblyVersion().ToString(fieldCount: 3);
            var fileVersion            = compiler.GetAssemblyFileVersion();
            var expectedFileVersion    = fileVersion.Substring(0, fileVersion.LastIndexOf('.'));

            return(string.Format(@"{{
  ""version"": ""{0}"",
  ""toolInfo"": {{
    ""toolName"": ""{1}"",
    ""productVersion"": ""{2}"",
    ""fileVersion"": ""{3}""
  }},", ErrorLogger.OutputFormatVersion, expectedToolName, expectedProductVersion, expectedFileVersion));
        }
예제 #5
0
        internal static string GetExpectedErrorLogHeader(string actualOutput, CommonCompiler compiler)
        {
            var expectedToolName        = compiler.GetToolName();
            var expectedVersion         = compiler.GetAssemblyVersion();
            var expectedSemanticVersion = compiler.GetAssemblyVersion().ToString(fieldCount: 3);
            var expectedFileVersion     = compiler.GetAssemblyFileVersion();
            var expectedLanguage        = compiler.GetCultureName();

            return(string.Format(@"{{
  ""$schema"": ""http://json.schemastore.org/sarif-1.0.0"",
  ""version"": ""1.0.0"",
  ""runs"": [
    {{
      ""tool"": {{
        ""name"": ""{0}"",
        ""version"": ""{1}"",
        ""fileVersion"": ""{2}"",
        ""semanticVersion"": ""{3}"",
        ""language"": ""{4}""
      }},", expectedToolName, expectedVersion, expectedFileVersion, expectedSemanticVersion, expectedLanguage));
        }
 internal CompilerEmitStreamProvider(CommonCompiler compiler, string filePath)
 {
     _compiler = compiler;
     _filePath = filePath;
 }
 internal CompilerEmitStreamProvider(CommonCompiler compiler, string filePath)
 {
     _compiler = compiler;
     _filePath = filePath;
 }
예제 #8
0
 internal CompilerEmitStreamProvider(CommonCompiler compiler, string filePath)
 {
     _compiler   = compiler;
     _filePath   = filePath;
     _lazyStream = s_uninitialized;
 }
 internal CompilerEmitStreamProvider(CommonCompiler compiler, TouchedFileLogger touchedFileLogger, string filePath)
 {
     _compiler          = compiler;
     _touchedFileLogger = touchedFileLogger;
     _filePath          = filePath;
 }