internal ScriptCompilerOptions(ScriptCompilerOptions scriptCompilerOptions)
 {
     ResponseFiles               = new List <string>(scriptCompilerOptions.ResponseFiles).ToArray();
     RoslynAnalyzerDllPaths      = new List <string>(scriptCompilerOptions.RoslynAnalyzerDllPaths).ToArray();
     RoslynAnalyzerRulesetPath   = scriptCompilerOptions.RoslynAnalyzerRulesetPath;
     UseDeterministicCompilation = scriptCompilerOptions.UseDeterministicCompilation;
     AllowUnsafeCode             = scriptCompilerOptions.AllowUnsafeCode;
     CodeOptimization            = scriptCompilerOptions.CodeOptimization;
     ApiCompatibilityLevel       = scriptCompilerOptions.ApiCompatibilityLevel;
     AdditionalCompilerArguments = scriptCompilerOptions.AdditionalCompilerArguments;
     LanguageVersion             = scriptCompilerOptions.LanguageVersion;
 }
예제 #2
0
 public Assembly(string name,
                 string outputPath,
                 string[] sourceFiles,
                 string[] defines,
                 Assembly[] assemblyReferences,
                 string[] compiledAssemblyReferences,
                 AssemblyFlags flags,
                 ScriptCompilerOptions compilerOptions)
 {
     this.name                       = name;
     this.outputPath                 = outputPath;
     this.sourceFiles                = sourceFiles;
     this.defines                    = defines;
     this.assemblyReferences         = assemblyReferences;
     this.compiledAssemblyReferences = compiledAssemblyReferences;
     this.flags                      = flags;
     this.compilerOptions            = compilerOptions;
 }
 public Assembly(string name,
                 string outputPath,
                 string[] sourceFiles,
                 string[] defines,
                 Assembly[] assemblyReferences,
                 string[] compiledAssemblyReferences,
                 AssemblyFlags flags,
                 ScriptCompilerOptions compilerOptions)
     : this(name,
            outputPath,
            sourceFiles,
            defines,
            assemblyReferences,
            compiledAssemblyReferences,
            flags,
            compilerOptions,
            string.Empty)
 {
 }
예제 #4
0
        public AssemblyBuilder(string assemblyPath, params string[] scriptPaths)
        {
            if (string.IsNullOrEmpty(assemblyPath))
            {
                throw new ArgumentException("assemblyPath cannot be null or empty");
            }

            if (scriptPaths == null || scriptPaths.Length == 0)
            {
                throw new ArgumentException("scriptPaths cannot be null or empty");
            }

            this.scriptPaths  = scriptPaths;
            this.assemblyPath = assemblyPath;

            compilerOptions  = new ScriptCompilerOptions();
            flags            = AssemblyBuilderFlags.None;
            buildTargetGroup = EditorUserBuildSettings.activeBuildTargetGroup;
            buildTarget      = EditorUserBuildSettings.activeBuildTarget;
        }