C# Class XSharp.Build.Xsc

Inheritance: Microsoft.Build.Tasks.ManagedCompiler
Afficher le fichier Open project: X-Sharp/XSharpPublic

Private Properties

Свойство Type Description
AddAdditionalFilesToCommandLine void
AddAnalyzersToCommandLine void
AddCscCompilerCommands void
AddFeatures void
AddManagedCompilerCommands void
AddReferencesToCommandLine void
AddVOCompatibilityCommands void
ConfigureDebugProperties void
FindXsc string

Méthodes publiques

Méthode Description
Xsc ( ) : System

Méthodes protégées

Méthode Description
AddResponseFileCommands ( Microsoft.Build.Tasks.CommandLineBuilderExtension commandLine ) : void
AddResponseFileCommandsImpl ( Microsoft.Build.Tasks.CommandLineBuilderExtension cmdline ) : void
ExecuteTool ( string pathToTool, string responseFileCommands, string commandLineCommands ) : int
GenerateCommandLineCommands ( ) : string
GenerateFullPathToTool ( ) : string
GenerateResponseFileCommands ( ) : string
LogEventsFromTextOutput ( string singleLine, MessageImportance messageImportance ) : void

Private Methods

Méthode Description
AddAdditionalFilesToCommandLine ( XSharpCommandLineBuilder commandLine ) : void

Adds a "/additionalfile:" switch to the command line for each additional file.

AddAnalyzersToCommandLine ( XSharpCommandLineBuilder commandLine, ITaskItem analyzers ) : void

Adds a "/analyzer:" switch to the command line for each provided analyzer.

AddCscCompilerCommands ( XSharpCommandLineBuilder commandLine ) : void

Mostly copied from the csc task in Roslyn

AddFeatures ( XSharpCommandLineBuilder commandLine, string features ) : void

Adds a "/features:" switch to the command line for each provided feature.

AddManagedCompilerCommands ( XSharpCommandLineBuilder cmdline ) : void

Mostly copied from the ManagedCompiler task in Roslyn

AddReferencesToCommandLine ( XSharpCommandLineBuilder commandLine, ITaskItem references, bool isInteractive = false ) : void

The C# compiler (starting with Whidbey) supports assembly aliasing for references. See spec at http://devdiv/spectool/Documents/Whidbey/VCSharp/Design%20Time/M3%20DCRs/DCR%20Assembly%20aliases.doc. This method handles the necessary work of looking at the "Aliases" attribute on the incoming "References" items, and making sure to generate the correct command-line on csc.exe. The syntax for aliasing a reference is: csc.exe /reference:Foo=System.Xml.dll The "Aliases" attribute on the "References" items is actually a comma-separated list of aliases, and if any of the aliases specified is the string "global", then we add that reference to the command-line without an alias.

AddVOCompatibilityCommands ( XSharpCommandLineBuilder commandline ) : void
ConfigureDebugProperties ( ) : void

Configure the debug switches which will be placed on the compiler command-line. The matrix of debug type and symbol inputs and the desired results is as follows: Debug Symbols DebugType Desired Results True Full /debug+ /debug:full True PdbOnly /debug+ /debug:PdbOnly True None /debug- True Blank /debug+ False Full /debug- /debug:full False PdbOnly /debug- /debug:PdbOnly False None /debug- False Blank /debug- Blank Full /debug:full Blank PdbOnly /debug:PdbOnly Blank None /debug- Debug: Blank Blank /debug+ //Microsoft.common.targets will set this Release: Blank Blank "Nothing for either switch" The logic is as follows: If debugtype is none set debugtype to empty and debugSymbols to false If debugType is blank use the debugsymbols "as is" If debug type is set, use its value and the debugsymbols value "as is"

FindXsc ( string toolName ) : string

Method Details

AddResponseFileCommands() protected méthode

protected AddResponseFileCommands ( Microsoft.Build.Tasks.CommandLineBuilderExtension commandLine ) : void
commandLine Microsoft.Build.Tasks.CommandLineBuilderExtension
Résultat void

AddResponseFileCommandsImpl() protected méthode

protected AddResponseFileCommandsImpl ( Microsoft.Build.Tasks.CommandLineBuilderExtension cmdline ) : void
cmdline Microsoft.Build.Tasks.CommandLineBuilderExtension
Résultat void

ExecuteTool() protected méthode

protected ExecuteTool ( string pathToTool, string responseFileCommands, string commandLineCommands ) : int
pathToTool string
responseFileCommands string
commandLineCommands string
Résultat int

GenerateCommandLineCommands() protected méthode

protected GenerateCommandLineCommands ( ) : string
Résultat string

GenerateFullPathToTool() protected méthode

protected GenerateFullPathToTool ( ) : string
Résultat string

GenerateResponseFileCommands() protected méthode

protected GenerateResponseFileCommands ( ) : string
Résultat string

LogEventsFromTextOutput() protected méthode

protected LogEventsFromTextOutput ( string singleLine, MessageImportance messageImportance ) : void
singleLine string
messageImportance MessageImportance
Résultat void

Xsc() public méthode

public Xsc ( ) : System
Résultat System