• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OutputKind类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OutputKind的典型用法代码示例。如果您正苦于以下问题:C# OutputKind类的具体用法?C# OutputKind怎么用?C# OutputKind使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OutputKind类属于命名空间,在下文中一共展示了OutputKind类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PEDeltaAssemblyBuilder

        public PEDeltaAssemblyBuilder(
            SourceAssemblySymbol sourceAssembly,
            string outputName,
            OutputKind outputKind,
            ModulePropertiesForSerialization serializationProperties,
            IEnumerable<ResourceDescription> manifestResources,
            Func<AssemblySymbol, AssemblyIdentity> assemblySymbolMapper,
            EmitBaseline previousGeneration,
            IEnumerable<SemanticEdit> edits)
            : base(sourceAssembly, outputName, outputKind, serializationProperties, manifestResources, assemblySymbolMapper, additionalTypes: ImmutableArray<NamedTypeSymbol>.Empty, metadataOnly:false)
        {
            var context = new EmitContext(this, null, new DiagnosticBag());
            var module = previousGeneration.OriginalMetadata;
            var compilation = sourceAssembly.DeclaringCompilation;
            var metadataAssembly = compilation.GetBoundReferenceManager().CreatePEAssemblyForAssemblyMetadata(AssemblyMetadata.Create(module), MetadataImportOptions.All);
            var metadataDecoder = new Microsoft.CodeAnalysis.CSharp.Symbols.Metadata.PE.MetadataDecoder(metadataAssembly.PrimaryModule);

            previousGeneration = EnsureInitialized(previousGeneration, metadataDecoder);

            var matchToMetadata = new SymbolMatcher(previousGeneration.AnonymousTypeMap, sourceAssembly, context, metadataAssembly);

            SymbolMatcher matchToPrevious = null;
            if (previousGeneration.Ordinal > 0)
            {
                var previousAssembly = ((CSharpCompilation)previousGeneration.Compilation).SourceAssembly;
                var previousContext = new EmitContext((PEModuleBuilder)previousGeneration.PEModuleBuilder, null, new DiagnosticBag());
                matchToPrevious = new SymbolMatcher(previousGeneration.AnonymousTypeMap, sourceAssembly, context, previousAssembly, previousContext);
            }

            this.previousDefinitions = new CSharpDefinitionMap(previousGeneration.OriginalMetadata.Module, edits, metadataDecoder, matchToMetadata, matchToPrevious);
            this.previousGeneration = previousGeneration;
            this.changes = new SymbolChanges(this.previousDefinitions, edits);
        }
开发者ID:pheede,项目名称:roslyn,代码行数:33,代码来源:PEDeltaAssemblyBuilder.cs


示例2: InnerCompile

        protected sealed override Task<CompilationResult> InnerCompile(OutputKind outputKind, string outputName,
            CancellationToken cancellationToken)
        {
            var compilation = CreateCompilation(
                Parse(),
                outputKind,
                outputName ?? "tmp" + Guid.NewGuid().ToString("N"));

            var ms = new MemoryStream();
            var emitResult = compilation.Emit(ms, cancellationToken: cancellationToken);

            var compileResult = new CompilationResult {OutputKind = outputKind};

            compileResult.Messages = emitResult.Diagnostics;
            compileResult.Succeeded = emitResult.Success;

            if (emitResult.Success)
            {
                ms.Seek(0, SeekOrigin.Begin);
                compileResult.Output = ms;
            }
            else
            {
                compileResult.Reason = ResultReasons.Compilation.Failed;
                ms.Dispose();
            }

            return Task.FromResult(compileResult);
        }
开发者ID:jhancock93,项目名称:autorest,代码行数:29,代码来源:ManagedCompiler.cs


示例3: ModuleData

 public ModuleData(AssemblyIdentity identity, OutputKind kind, ImmutableArray<byte> image, ImmutableArray<byte> pdb, bool inMemoryModule)
 {
     this.Id = new ModuleDataId(identity.Name, identity.GetDisplayName(), GetMvid(image));
     this.Kind = kind;
     this.Image = image;
     this.Pdb = pdb;
     this.InMemoryModule = inMemoryModule;
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:8,代码来源:ModuleData.cs


示例4: PEDeltaAssemblyBuilder

        public PEDeltaAssemblyBuilder(
            SourceAssemblySymbol sourceAssembly,
            EmitOptions emitOptions,
            OutputKind outputKind,
            Cci.ModulePropertiesForSerialization serializationProperties,
            IEnumerable<ResourceDescription> manifestResources,
            EmitBaseline previousGeneration,
            IEnumerable<SemanticEdit> edits,
            Func<ISymbol, bool> isAddedSymbol)
            : base(sourceAssembly, emitOptions, outputKind, serializationProperties, manifestResources, additionalTypes: ImmutableArray<NamedTypeSymbol>.Empty)
        {
            var initialBaseline = previousGeneration.InitialBaseline;
            var context = new EmitContext(this, null, new DiagnosticBag());

            // Hydrate symbols from initial metadata. Once we do so it is important to reuse these symbols across all generations,
            // in order for the symbol matcher to be able to use reference equality once it maps symbols to initial metadata.
            var metadataSymbols = GetOrCreateMetadataSymbols(initialBaseline, sourceAssembly.DeclaringCompilation);
            var metadataDecoder = (MetadataDecoder)metadataSymbols.MetadataDecoder;
            var metadataAssembly = (PEAssemblySymbol)metadataDecoder.ModuleSymbol.ContainingAssembly;

            var matchToMetadata = new CSharpSymbolMatcher(metadataSymbols.AnonymousTypes, sourceAssembly, context, metadataAssembly);

            CSharpSymbolMatcher matchToPrevious = null;
            if (previousGeneration.Ordinal > 0)
            {
                var previousAssembly = ((CSharpCompilation)previousGeneration.Compilation).SourceAssembly;
                var previousContext = new EmitContext((PEModuleBuilder)previousGeneration.PEModuleBuilder, null, new DiagnosticBag());

                matchToPrevious = new CSharpSymbolMatcher(
                    previousGeneration.AnonymousTypeMap,
                    sourceAssembly: sourceAssembly,
                    sourceContext: context,
                    otherAssembly: previousAssembly,
                    otherContext: previousContext,
                    otherSynthesizedMembersOpt: previousGeneration.SynthesizedMembers);
            }

            _previousDefinitions = new CSharpDefinitionMap(previousGeneration.OriginalMetadata.Module, edits, metadataDecoder, matchToMetadata, matchToPrevious);
            _previousGeneration = previousGeneration;
            _changes = new SymbolChanges(_previousDefinitions, edits, isAddedSymbol);

            // Workaround for https://github.com/dotnet/roslyn/issues/3192.
            // When compiling state machine we stash types of awaiters and state-machine hoisted variables,
            // so that next generation can look variables up and reuse their slots if possible.
            //
            // When we are about to allocate a slot for a lifted variable while compiling the next generation
            // we map its type to the previous generation and then check the slot types that we stashed earlier.
            // If the variable type matches we reuse it. In order to compare the previous variable type with the current one
            // both need to be completely lowered (translated). Standard translation only goes one level deep. 
            // Generic arguments are not translated until they are needed by metadata writer. 
            //
            // In order to get the fully lowered form we run the type symbols of stashed variables thru a deep translator
            // that translates the symbol recursively.
            _deepTranslator = new CSharpSymbolMatcher.DeepTranslator(sourceAssembly.GetSpecialType(SpecialType.System_Object));
        }
开发者ID:GeertVL,项目名称:roslyn,代码行数:55,代码来源:PEDeltaAssemblyBuilder.cs


示例5: CreateCompilation

        protected sealed override CodeAnalysis.Compilation CreateCompilation(IEnumerable<SyntaxTree> syntaxTrees,
            OutputKind outputKind, string outputName)
        {
            var compilation = CSharpCompilation.Create(
                outputName,
                syntaxTrees,
                References,
                GetCompilationOptions(outputKind));

            return compilation;
        }
开发者ID:jhancock93,项目名称:autorest,代码行数:11,代码来源:CSharpCompiler.cs


示例6: PEAssemblyBuilder

        public PEAssemblyBuilder(
            SourceAssemblySymbol sourceAssembly,
            Cci.ModulePropertiesForSerialization serializationProperties,
            IEnumerable<ResourceDescription> manifestResources,
            OutputKind outputKind,
            EmitOptions emitOptions)
            :base(sourceAssembly.DeclaringCompilation, (SourceModuleSymbol)sourceAssembly.Modules[0], serializationProperties, manifestResources, outputKind, emitOptions)
        {
            _sourceAssembly = sourceAssembly;
            _metadataName = (emitOptions.OutputNameOverride == null) ? sourceAssembly.MetadataName : FileNameUtilities.ChangeExtension(emitOptions.OutputNameOverride, extension: null);

            AssemblyOrModuleSymbolToModuleRefMap.Add(sourceAssembly, this);
        }
开发者ID:iolevel,项目名称:peachpie,代码行数:13,代码来源:PEAssemblyBuilder.cs


示例7: Compile

        public async Task<CompilationResult> Compile(OutputKind outputKind, string outputName = null)
        {
            var cancellationTokenSource = new CancellationTokenSource();

            try
            {
                var task = InnerCompile(outputKind, outputName, cancellationTokenSource.Token);
                cancellationTokenSource.CancelAfter(Timeout);
                return await task.ConfigureAwait(false);
            }
            catch (OperationCanceledException)
            {
                if (cancellationTokenSource.IsCancellationRequested)
                {
                    // Trace.TraceInformation("{0}:InnerCompile timed-out.", GetType().Name);
                    return new CompilationResult
                    {
                        Succeeded = false,
                        Reason = ResultReasons.TimedOutError,
                        // Messages = new[] {"Maximum compilation time reached"},
                        OutputKind = outputKind
                    };
                }
                else
                {
                    // Trace.TraceWarning("{0}:InnerCompile was unexpectedly canceled. Exception: {1}", GetType().Name, ocex);
                    return new CompilationResult
                    {
                        Succeeded = false,
                        Reason = ResultReasons.CanceledError,
                        // Messages = new[] {"Compilation was canceled"},
                        OutputKind = outputKind
                    };
                }
            }
            catch (Exception)
            {
                // Trace.TraceError("{0}:InnerCompile failed. Exception: {1}", GetType().Name, ex);
                return new CompilationResult
                {
                    Succeeded = false,
                    Reason = ResultReasons.UnknownError,
                    // Errors = new[] {"Unknown error"},
                    OutputKind = outputKind
                };
            }
            finally
            {
                cancellationTokenSource.Dispose();
            }
        }
开发者ID:devigned,项目名称:autorest,代码行数:51,代码来源:Compiler.cs


示例8: PEAssemblyBuilderBase

        public PEAssemblyBuilderBase(
            SourceAssemblySymbol sourceAssembly,
            EmitOptions emitOptions,
            OutputKind outputKind,
            Cci.ModulePropertiesForSerialization serializationProperties,
            IEnumerable<ResourceDescription> manifestResources,
            ImmutableArray<NamedTypeSymbol> additionalTypes)
            : base((SourceModuleSymbol)sourceAssembly.Modules[0], emitOptions, outputKind, serializationProperties, manifestResources)
        {
            Debug.Assert((object)sourceAssembly != null);

            _sourceAssembly = sourceAssembly;
            _additionalTypes = additionalTypes.NullToEmpty();
            _metadataName = (emitOptions.OutputNameOverride == null) ? sourceAssembly.MetadataName : FileNameUtilities.ChangeExtension(emitOptions.OutputNameOverride, extension: null);

            AssemblyOrModuleSymbolToModuleRefMap.Add(sourceAssembly, this);
        }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:17,代码来源:PEAssemblyBuilder.cs


示例9: PEAssemblyBuilderBase

        public PEAssemblyBuilderBase(
            SourceAssemblySymbol sourceAssembly,
            string outputName,
            OutputKind outputKind,
            ModulePropertiesForSerialization serializationProperties,
            IEnumerable<ResourceDescription> manifestResources,
            Func<AssemblySymbol, AssemblyIdentity> assemblySymbolMapper,
            ImmutableArray<NamedTypeSymbol> additionalTypes)
            : base((SourceModuleSymbol)sourceAssembly.Modules[0], outputName, outputKind, serializationProperties, manifestResources, assemblySymbolMapper)
        {
            Debug.Assert((object)sourceAssembly != null);

            this.sourceAssembly = sourceAssembly;
            this.additionalTypes = additionalTypes.NullToEmpty();
            this.metadataName = outputName == null ? sourceAssembly.MetadataName : PathUtilities.RemoveExtension(outputName);

            AssemblyOrModuleSymbolToModuleRefMap.Add(sourceAssembly, this);
        }
开发者ID:riversky,项目名称:roslyn,代码行数:18,代码来源:PEAssemblyBuilder.cs


示例10: GetCompilationOptions

        public static CSharpCompilationOptions GetCompilationOptions(OutputKind outputKind)
        {
            switch (outputKind)
            {
                case OutputKind.ConsoleApplication:
                    return new CSharpCompilationOptions(
                        CodeAnalysis.OutputKind.ConsoleApplication,
                        allowUnsafe: false,
                        concurrentBuild: false,
                        optimizationLevel: OptimizationLevel.Debug);

                case OutputKind.DynamicallyLinkedLibrary:
                    return new CSharpCompilationOptions(
                        CodeAnalysis.OutputKind.DynamicallyLinkedLibrary,
                        allowUnsafe: false,
                        concurrentBuild: false,
                        optimizationLevel: OptimizationLevel.Debug);

                default:
                    throw new NotSupportedException();
            }
        }
开发者ID:jhancock93,项目名称:autorest,代码行数:22,代码来源:CSharpCompiler.cs


示例11: VerifyParamArrayAttribute

        internal static void VerifyParamArrayAttribute(ParameterSymbol parameter, SourceModuleSymbol module, bool expected = true, OutputKind outputKind = OutputKind.ConsoleApplication)
        {
            Assert.Equal(expected, parameter.IsParams);

            var emitModule = new PEAssemblyBuilder(module.ContainingSourceAssembly, null, outputKind, GetDefaultModulePropertiesForSerialization(), SpecializedCollections.EmptyEnumerable<ResourceDescription>());
            var paramArrayAttributeCtor = (MethodSymbol)emitModule.Compilation.GetWellKnownTypeMember(WellKnownMember.System_ParamArrayAttribute__ctor);
            bool found = false;

            var context = new EmitContext(emitModule, null, new DiagnosticBag());

            foreach (Microsoft.Cci.ICustomAttribute attr in parameter.GetSynthesizedAttributes())
            {
                if (paramArrayAttributeCtor == (MethodSymbol)attr.Constructor(context))
                {
                    Assert.False(found, "Multiple ParamArrayAttribute");
                    found = true;
                }
            }

            Assert.Equal(expected, found);
            context.Diagnostics.Verify();
        }
开发者ID:modulexcite,项目名称:pattern-matching-csharp,代码行数:22,代码来源:WellKnownAttributesTestBase.cs


示例12: PEModuleBuilder

        protected PEModuleBuilder(
            PhpCompilation compilation,
            SourceModuleSymbol sourceModule,
            Cci.ModulePropertiesForSerialization serializationProperties,
            IEnumerable<ResourceDescription> manifestResources,
            OutputKind outputKind,
            EmitOptions emitOptions)
        {
            Debug.Assert(sourceModule != null);
            Debug.Assert(serializationProperties != null);

            _compilation = compilation;
            _sourceModule = sourceModule;
            _serializationProperties = serializationProperties;
            this.ManifestResources = manifestResources;
            _outputKind = outputKind;
            _emitOptions = emitOptions;
            this.CompilationState = new CommonModuleCompilationState();
            _debugDocuments = new ConcurrentDictionary<string, Cci.DebugSourceDocument>(compilation.IsCaseSensitive ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase);
            _synthesized = new SynthesizedManager(this);

            AssemblyOrModuleSymbolToModuleRefMap.Add(sourceModule, this);
        }
开发者ID:iolevel,项目名称:peachpie,代码行数:23,代码来源:PEModuleBuilder.cs


示例13: CSharpProject

 public CSharpProject(string projectFile)
 {
     if (!File.Exists(projectFile))
         throw new Exception(string.Format("project file not found \"{0}\"", projectFile));
     WriteLine(1, "compile project \"{0}\"", projectFile);
     _projectFile = projectFile;
     _projectDirectory = Path.GetDirectoryName(projectFile);
     _projectDocument = XDocument.Load(projectFile);
     _frameworkDirectory = GetValue("FrameworkDirectory");
     WriteLine(2, "  framework directory               : \"{0}\"", _frameworkDirectory);
     _assemblyName = GetValue("AssemblyName");
     WriteLine(2, "  assembly name                     : \"{0}\"", _assemblyName);
     string outputDirectory = PathCombine(_projectDirectory, GetValue("OutputDirectory"));
     WriteLine(2, "  output directory                  : \"{0}\"", outputDirectory);
     _languageVersion = GetLanguageVersion(GetValue("LanguageVersion"));
     WriteLine(2, "  language version                  : \"{0}\"", _languageVersion);
     _outputKind = GetOutputKind(GetValue("OutputKind"));
     WriteLine(2, "  output kind                       : \"{0}\"", _outputKind);
     _optimizationLevel = GetOptimizationLevel(GetValue("OptimizationLevel"));
     WriteLine(2, "  optimization level                : \"{0}\"", _optimizationLevel);
     _platform = GetPlatform(GetValue("Platform"));
     WriteLine(2, "  platform                          : \"{0}\"", _platform);
     _generalDiagnosticOption = ReportDiagnostic.Default;
     WriteLine(2, "  general diagnostic option         : \"{0}\"", _generalDiagnosticOption);
     _warningLevel = 4;
     WriteLine(2, "  warning level                     : \"{0}\"", _warningLevel);
     _outputPath = PathCombine(outputDirectory, GetValue("OutputPath"));
     WriteLine(2, "  output path                       : \"{0}\"", _outputPath);
     _pdbPath = PathCombine(outputDirectory, GetValue("PdbPath"));
     WriteLine(2, "  pdb path                          : \"{0}\"", _pdbPath);
     _win32ResourceFile = PathCombine(_projectDirectory, GetValue("Win32ResourceFile"));
     WriteLine(2, "  win32 resource file               : \"{0}\"", _win32ResourceFile);
     _preprocessorSymbols = GetPreprocessorSymbols();
     _sourceFiles = GetSources();
     _resourceFiles = GetResourceFiles();
     _assembliesFiles = GetAssembliesFiles();
 }
开发者ID:labeuze,项目名称:source,代码行数:37,代码来源:CSharpProject.cs


示例14: CommonWithOutputKind

 protected abstract CompilationOptions CommonWithOutputKind(OutputKind kind);
开发者ID:nemec,项目名称:roslyn,代码行数:1,代码来源:CompilationOptions.cs


示例15: WithOutputKind

 /// <summary>
 /// Creates a new options instance with the specified output kind.
 /// </summary>
 public CompilationOptions WithOutputKind(OutputKind kind)
 {
     return CommonWithOutputKind(kind);
 }
开发者ID:nemec,项目名称:roslyn,代码行数:7,代码来源:CompilationOptions.cs


示例16: CompilationOptions

        // Expects correct arguments.
        internal CompilationOptions(
            OutputKind outputKind,
            bool reportSuppressedDiagnostics,
            string moduleName,
            string mainTypeName,
            string scriptClassName,
            string cryptoKeyContainer,
            string cryptoKeyFile,
            ImmutableArray<byte> cryptoPublicKey,
            bool? delaySign,
            OptimizationLevel optimizationLevel,
            bool checkOverflow,
            Platform platform,
            ReportDiagnostic generalDiagnosticOption,
            int warningLevel,
            ImmutableDictionary<string, ReportDiagnostic> specificDiagnosticOptions,
            bool concurrentBuild,
            bool extendedCustomDebugInformation,
            bool debugPlusMode,
            XmlReferenceResolver xmlReferenceResolver,
            SourceReferenceResolver sourceReferenceResolver,
            MetadataReferenceResolver metadataReferenceResolver,
            AssemblyIdentityComparer assemblyIdentityComparer,
            StrongNameProvider strongNameProvider,
            MetadataImportOptions metadataImportOptions)
        {
            this.OutputKind = outputKind;
            this.ModuleName = moduleName;
            this.MainTypeName = mainTypeName;
            this.ScriptClassName = scriptClassName ?? WellKnownMemberNames.DefaultScriptClassName;
            this.CryptoKeyContainer = cryptoKeyContainer;
            this.CryptoKeyFile = cryptoKeyFile;
            this.CryptoPublicKey = cryptoPublicKey.NullToEmpty();
            this.DelaySign = delaySign;
            this.CheckOverflow = checkOverflow;
            this.Platform = platform;
            this.GeneralDiagnosticOption = generalDiagnosticOption;
            this.WarningLevel = warningLevel;
            this.SpecificDiagnosticOptions = specificDiagnosticOptions;
            this.ReportSuppressedDiagnostics = reportSuppressedDiagnostics;
            this.OptimizationLevel = optimizationLevel;
            this.ConcurrentBuild = concurrentBuild;
            this.ExtendedCustomDebugInformation = extendedCustomDebugInformation;
            this.DebugPlusMode = debugPlusMode;
            this.XmlReferenceResolver = xmlReferenceResolver;
            this.SourceReferenceResolver = sourceReferenceResolver;
            this.MetadataReferenceResolver = metadataReferenceResolver;
            this.StrongNameProvider = strongNameProvider;
            this.AssemblyIdentityComparer = assemblyIdentityComparer ?? AssemblyIdentityComparer.Default;
            this.MetadataImportOptions = metadataImportOptions;

            _lazyErrors = new Lazy<ImmutableArray<Diagnostic>>(() =>
            {
                var builder = ArrayBuilder<Diagnostic>.GetInstance();
                ValidateOptions(builder);
                return builder.ToImmutableAndFree();
            });
        }
开发者ID:nemec,项目名称:roslyn,代码行数:59,代码来源:CompilationOptions.cs


示例17: OpenManifestStream

 private static Stream OpenManifestStream(CommonMessageProvider messageProvider, OutputKind outputKind, CommandLineArguments arguments, List<DiagnosticInfo> errorList)
 {
     return outputKind.IsNetModule()
         ? null
         : OpenStream(messageProvider, arguments.Win32Manifest, arguments.BaseDirectory, messageProvider.ERR_CantOpenWin32Manifest, errorList);
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:6,代码来源:CommonCompiler.cs


示例18: Evaluate

        internal CompilationTestData Evaluate(
            string source,
            OutputKind outputKind,
            string methodName,
            string expr,
            out ResultProperties resultProperties,
            out string error,
            int atLineNumber = -1,
            bool includeSymbols = true)
        {
            var compilation0 = CreateCompilationWithMscorlib(
                source,
                options: (outputKind == OutputKind.DynamicallyLinkedLibrary) ? TestOptions.DebugDll : TestOptions.DebugExe);

            var runtime = CreateRuntimeInstance(compilation0, includeSymbols);
            var context = CreateMethodContext(runtime, methodName, atLineNumber);
            var testData = new CompilationTestData();
            ImmutableArray<AssemblyIdentity> missingAssemblyIdentities;
            var result = context.CompileExpression(
                expr,
                DkmEvaluationFlags.TreatAsExpression,
                NoAliases,
                DebuggerDiagnosticFormatter.Instance,
                out resultProperties,
                out error,
                out missingAssemblyIdentities,
                EnsureEnglishUICulture.PreferredOrNull,
                testData);
            Assert.Empty(missingAssemblyIdentities);
            return testData;
        }
开发者ID:JackWangCUMT,项目名称:roslyn,代码行数:31,代码来源:ExpressionCompilerTestBase.cs


示例19: ValidateWin32Settings

        private static void ValidateWin32Settings(string win32ResourceFile, string win32IconResourceFile, string win32ManifestFile, OutputKind outputKind, IList<Diagnostic> diagnostics)
        {
            if (win32ResourceFile != null)
            {
                if (win32IconResourceFile != null)
                {
                    AddDiagnostic(diagnostics, ErrorCode.ERR_CantHaveWin32ResAndIcon);
                }

                if (win32ManifestFile != null)
                {
                    AddDiagnostic(diagnostics, ErrorCode.ERR_CantHaveWin32ResAndManifest);
                }
            }

            if (outputKind.IsNetModule() && win32ManifestFile != null)
            {
                AddDiagnostic(diagnostics, ErrorCode.WRN_CantHaveManifestForModule);
            }
        }
开发者ID:LunicLynx,项目名称:roslyn,代码行数:20,代码来源:CommandLineParser.cs


示例20: CompilationOptions

        // Expects correct arguments.
        internal CompilationOptions(
            OutputKind outputKind,
            string moduleName,
            string mainTypeName,
            string scriptClassName,
            string cryptoKeyContainer,
            string cryptoKeyFile,
            bool? delaySign,
            OptimizationLevel optimizationLevel,
            bool checkOverflow,
            int fileAlignment,
            ulong baseAddress,
            Platform platform,
            ReportDiagnostic generalDiagnosticOption,
            int warningLevel,
            ImmutableDictionary<string, ReportDiagnostic> specificDiagnosticOptions,
            bool highEntropyVirtualAddressSpace,
            SubsystemVersion subsystemVersion,
            bool concurrentBuild,
            XmlReferenceResolver xmlReferenceResolver,
            SourceReferenceResolver sourceReferenceResolver,
            MetadataReferenceResolver metadataReferenceResolver,
            MetadataReferenceProvider metadataReferenceProvider,
            AssemblyIdentityComparer assemblyIdentityComparer,
            StrongNameProvider strongNameProvider,
            MetadataImportOptions metadataImportOptions,
            ImmutableArray<string> features)
        {
            this.OutputKind = outputKind;
            this.ModuleName = moduleName;
            this.MainTypeName = mainTypeName;
            this.ScriptClassName = scriptClassName;
            this.CryptoKeyContainer = cryptoKeyContainer;
            this.CryptoKeyFile = cryptoKeyFile;
            this.DelaySign = delaySign;
            this.CheckOverflow = checkOverflow;
            this.FileAlignment = fileAlignment;
            this.BaseAddress = baseAddress;
            this.Platform = platform;
            this.GeneralDiagnosticOption = generalDiagnosticOption;
            this.WarningLevel = warningLevel;
            this.SpecificDiagnosticOptions = specificDiagnosticOptions;
            this.HighEntropyVirtualAddressSpace = highEntropyVirtualAddressSpace;
            this.OptimizationLevel = optimizationLevel;
            this.ConcurrentBuild = concurrentBuild;
            this.SubsystemVersion = subsystemVersion;
            this.XmlReferenceResolver = xmlReferenceResolver;
            this.SourceReferenceResolver = sourceReferenceResolver;
            this.MetadataReferenceResolver = metadataReferenceResolver;
            this.MetadataReferenceProvider = metadataReferenceProvider;
            this.StrongNameProvider = strongNameProvider;
            this.AssemblyIdentityComparer = assemblyIdentityComparer ?? AssemblyIdentityComparer.Default;
            this.MetadataImportOptions = metadataImportOptions;
            this.Features = features;

            this.lazyErrors = new Lazy<ImmutableArray<Diagnostic>>(() =>
            {
                var builder = ArrayBuilder<Diagnostic>.GetInstance();
                ValidateOptions(builder);
                return builder.ToImmutableAndFree();
            });
        }
开发者ID:modulexcite,项目名称:pattern-matching-csharp,代码行数:63,代码来源:CompilationOptions.cs



注:本文中的OutputKind类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OutputPort类代码示例发布时间:2022-05-24
下一篇:
C# OutputFormatType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap