PartialClassGenerationTask Classe

Definição

Acessa os arquivos XAML que definem tipos (com x:Class) e gera o código-fonte correspondente que pode ser compilado em um assembly.Accesses XAML files that define types (with x:Class) and generates the corresponding source code that can be compiled into an assembly.

public ref class PartialClassGenerationTask : Microsoft::Build::Utilities::Task
public class PartialClassGenerationTask : Microsoft.Build.Utilities.Task
type PartialClassGenerationTask = class
    inherit Task
Public Class PartialClassGenerationTask
Inherits Task
Herança
PartialClassGenerationTask

Comentários

Os arquivos XAML processados por essa tarefa definem novos tipos, bem como instanciam esses tipos.The XAML files processed by this task define new types as well as instantiate those types. A PartialClassGenerationTask classe lê as novas definições de tipo e gera arquivos de código-fonte.The PartialClassGenerationTask class reads in the new type definitions and generates source code files. Além disso, ele gera um arquivo XAML que contém a marcação que instancia os tipos gerados recentemente.In addition, it generates a XAML file that contains the markup that instantiates the newly generated types.

Essa tarefa não deve ser usada para consumir entradas XAML não confiáveis.This task should not be used to consume untrusted XAML inputs.

Construtores

PartialClassGenerationTask()

Inicializa uma nova instância da classe PartialClassGenerationTask.Initializes a new instance of the PartialClassGenerationTask class.

Propriedades

ApplicationMarkup

Obtém ou define uma lista de arquivos XAML para processar, populada pelo MS Build.Gets or sets a list of XAML files to process, populated by MS Build.

AssemblyName

Obtém ou define o nome do assembly que está sendo compilado.Gets or sets the name of the assembly being compiled.

BuildEngine

O mecanismo de build define automaticamente essa propriedade para permitir que tarefas retornem para ela.The build engine automatically sets this property to allow tasks to call back into it.

(Herdado de Task)
BuildEngine2

O mecanismo de build define automaticamente essa propriedade para permitir que tarefas retornem para ela.The build engine automatically sets this property to allow tasks to call back into it. Esta é uma propriedade de conveniência para que os autores de tarefa que herdam desta classe não precisem converter o valor de IBuildEngine em IBuildEngine2.This is a convenience property so that task authors inheriting from this class do not have to cast the value from IBuildEngine to IBuildEngine2.

(Herdado de Task)
BuildEngine3

Recupera a versão IBuildEngine3 da interface do mecanismo de build fornecida pelo host.Retrieves the IBuildEngine3 version of the build engine interface provided by the host.

(Herdado de Task)
BuildEngine4

Recupera a versão IBuildEngine4 da interface do mecanismo de build fornecida pelo host.Retrieves the IBuildEngine4 version of the build engine interface provided by the host.

(Herdado de Task)
BuildEngine5

Recupera a versão IBuildEngine5 da interface do mecanismo de build fornecida pelo host.Retrieves the IBuildEngine5 version of the build engine interface provided by the host.

(Herdado de Task)
BuildEngine6

Recupera a versão IBuildEngine6 da interface do mecanismo de build fornecida pelo host.Retrieves the IBuildEngine6 version of the build engine interface provided by the host.

(Herdado de Task)
BuildEngine7

Obtém a versão da interface do mecanismo de build fornecida pelo host.Gets the version of the build engine interface provided by the host.

(Herdado de Task)
BuildTaskPath

Obtém ou define o caminho do assembly que contém a tarefa de build.Gets or sets the path of the assembly that contains this build task.

GeneratedCodeFiles

Obtém ou define uma lista de arquivos de código gerados, um para cada arquivo de entrada.Gets or sets a list of generated code files, one for each input file.

GeneratedResources

Obtém ou define uma lista de arquivos XAML que contêm a marcação para criar uma instância dos tipos recém-gerados, sendo um para cada arquivo de entrada.Gets or sets a list of XAML files that contain the markup for instantiating the newly generated types, one for each input file.

GeneratedSourceExtension

Obtém ou define a extensão do arquivo a ser adicionada aos arquivos de origem gerados.Gets or sets the file extension to add to the generated source files.

HelpKeywordPrefix

Obtém ou define o prefixo usado para compor palavras-chave de ajuda a partir de nomes de recursos de cadeia de caracteres.Gets or sets the prefix used to compose help keywords from string resource names. Se uma tarefa não tiver palavras-chave de ajuda associadas a suas mensagens, ela poderá ignorar essa propriedade ou defini-la como nula.If a task does not have help keywords associated with its messages, it can ignore this property or set it to null. Se o prefixo for definido para uma cadeia de caracteres vazia, os nomes de recursos de cadeia de caracteres serão usados literalmente como palavras-chave de ajuda.If the prefix is set to an empty string, then string resource names will be used verbatim as help keywords. Para um exemplo de como esse prefixo é usado, confira o método TaskLoggingHelper.LogErrorWithCodeFromResources(string,object[]).For an example of how this prefix is used, see the TaskLoggingHelper.LogErrorWithCodeFromResources(string, object[]) method.

(Herdado de Task)
HostObject

O mecanismo de compilação define essa propriedade se o IDE do host associou um objeto de host com essa tarefa em particular.The build engine sets this property if the host IDE has associated a host object with this particular task.

(Herdado de Task)
IsInProcessXamlMarkupCompile

Obtém ou define se a compilação de marcação XAML está no processo.Gets or sets whether the compilation of XAML markup is in process.

KnownReferencePaths

Obtém ou define os caminhos de referência conhecidos.Gets or sets the known reference paths.

Language

Obtém ou define a linguagem na qual gerar o código-fonte.Gets or sets the language to generate source code in.

Log

Obtém uma instância de uma classe TaskLoggingHelper que contém métodos de registro em log da tarefa.Gets an instance of a TaskLoggingHelper class containing task logging methods. O taskLoggingHelper é um objeto MarshallByRef que precisará ter MarkAsInactive chamado se a tarefa pai estiver fazendo o appdomain e o marshaling esse objeto nele.The taskLoggingHelper is a MarshallByRef object which needs to have MarkAsInactive called if the parent task is making the appdomain and marshaling this object into it. Se o AppDomain não for descarregado no final da execução da tarefa e o método MarkAsInactive não for chamado, isso resultará em um vazamento das instâncias de tarefa no AppDomain em que a tarefa foi criada.If the appdomain is not unloaded at the end of the task execution and the MarkAsInactive method is not called this will result in a leak of the task instances in the appdomain the task was created within.

(Herdado de Task)
MSBuildProjectDirectory

Obtém ou define o diretório do projeto do MS Build.Gets or sets the directory of MS build project.

OutputPath

Obtém ou define o diretório no qual colocar os arquivos gerados.Gets or sets the directory to place the generated files.

References

Obtém ou define uma lista de assemblies a serem referenciados.Gets or sets a list of assemblies to reference.

RequiresCompilationPass2

Obtém ou define um valor que indica se este projeto requer a execução da tarefa CompilationPass2Task.Gets or sets a value that indicates whether this project requires executing the CompilationPass2Task task.

RootNamespace

Obtém ou define o namespace raiz para o projeto.Gets or sets the root namespace for the project.

SourceCodeFiles

Obtém ou define uma lista de arquivos de código-fonte no projeto.Gets or sets a list of source code files in the project.

TaskResources

Obtém ou define os recursos específicos de cultura da tarefa.Gets or sets the task's culture-specific resources. As classes derivadas devem registrar seus recursos durante a construção ou por meio dessa propriedade, caso tenham cadeias de caracteres localizadas.Derived classes should register their resources either during construction, or via this property, if they have localized strings.

(Herdado de Task)
XamlBuildTypeGenerationExtensionNames

Obtém ou define a coleção dos nomes de extensão usados na geração do tipo de build XAML.Gets or sets the collection of extension names used in XAML build type generation.

XamlBuildTypeInspectionExtensionNames

Obtém ou define a coleção dos nomes de extensão usados na inspeção do tipo de build XAML.Gets or sets the collection of extension names used in XAML build type inspection.

Métodos

Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object.

(Herdado de Object)
Execute()

Chamado pelo MS Build para executar a tarefa de geração de código.Called by MS Build to execute the code generation task.

GetHashCode()

Serve como a função de hash padrão.Serves as the default hash function.

(Herdado de Object)
GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Herdado de Object)
MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Herdado de Object)
ToString()

Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object.

(Herdado de Object)

Aplica-se a