Exemplo n.º 1
0
        public void ValidateOptions(DiagnosticBag diagnostics, CommonMessageProvider messageProvider, bool isDeterministic)
        {
            if (OutputNameOverride != null)
            {
                MetadataHelpers.CheckAssemblyOrModuleName(OutputNameOverride, messageProvider, messageProvider.ERR_InvalidOutputName, diagnostics);
            }

            if (FileAlignment != 0 && !IsValidFileAlignment(FileAlignment))
            {
                diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidFileAlignment, Location.None, FileAlignment));
            }

            if (!SubsystemVersion.Equals(SubsystemVersion.None) && !SubsystemVersion.IsValid)
            {
                diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidSubsystemVersion, Location.None, SubsystemVersion.ToString()));
            }
        }
Exemplo n.º 2
0
 public EmitOptions(
     bool metadataOnly                   = false,
     string pdbFilePath                  = null,
     string outputNameOverride           = null,
     int fileAlignment                   = 0,
     ulong baseAddress                   = 0,
     bool highEntropyVirtualAddressSpace = false,
     SubsystemVersion subsystemVersion   = default(SubsystemVersion),
     string runtimeMetadataVersion       = null,
     bool tolerateErrors                 = false,
     bool includePrivateMembers          = true)
 {
     EmitMetadataOnly               = metadataOnly;
     PdbFilePath                    = pdbFilePath;
     OutputNameOverride             = outputNameOverride;
     FileAlignment                  = fileAlignment;
     BaseAddress                    = baseAddress;
     HighEntropyVirtualAddressSpace = highEntropyVirtualAddressSpace;
     SubsystemVersion               = subsystemVersion;
     RuntimeMetadataVersion         = runtimeMetadataVersion;
     TolerateErrors                 = tolerateErrors;
     IncludePrivateMembers          = includePrivateMembers;
 }