WorkflowInstanceExtensionManager.Add Método

Definição

Sobrecargas

Add(Object)

Adiciona a extensão especificada à coleção de extensões.Adds the specified extension to the collection of extensions.

Add<T>(Func<T>)

Registra uma Func<TResult> que é usada para fornecer uma instância de uma extensão quando solicitado por uma instância de fluxo de trabalho.Registers a Func<TResult> that is used to provide an instance of an extension when requested by a workflow instance.

Add(Object)

Adiciona a extensão especificada à coleção de extensões.Adds the specified extension to the collection of extensions.

public:
 virtual void Add(System::Object ^ singletonExtension);
public virtual void Add (object singletonExtension);
abstract member Add : obj -> unit
override this.Add : obj -> unit
Public Overridable Sub Add (singletonExtension As Object)

Parâmetros

singletonExtension
Object

A extensão a ser adicionada.The extension to add.

Comentários

Quando essa sobrecarga é usada, cada instância de fluxo de trabalho que solicita esse tipo de extensão obterá a instância de extensão fornecida para esse método.When this overload is used, each workflow instance that requests this extension type will get the extension instance provided to this method. Se cada instância de fluxo de trabalho deve ter sua própria instância da extensão, use a outra Add sobrecarga.If each workflow instance should have its own instance of the extension, use the other Add overload.

Se qualquer uma das Add sobrecargas for chamada depois MakeReadOnly , um InvalidOperationException será lançado.If any of the Add overloads are called after MakeReadOnly, an InvalidOperationException is thrown.

Aplica-se a

Add<T>(Func<T>)

Registra uma Func<TResult> que é usada para fornecer uma instância de uma extensão quando solicitado por uma instância de fluxo de trabalho.Registers a Func<TResult> that is used to provide an instance of an extension when requested by a workflow instance.

public:
generic <typename T>
 where T : class virtual void Add(Func<T> ^ extensionCreationFunction);
public virtual void Add<T> (Func<T> extensionCreationFunction) where T : class;
abstract member Add : Func<'T (requires 'T : null)> -> unit (requires 'T : null)
override this.Add : Func<'T (requires 'T : null)> -> unit (requires 'T : null)
Public Overridable Sub Add(Of T As Class) (extensionCreationFunction As Func(Of T))

Parâmetros de tipo

T

O tipo de extensão a ser adicionado.The type of extension to add.

Parâmetros

extensionCreationFunction
Func<T>

O método que cria a extensão.The method that creates the extension.

Comentários

Quando essa sobrecarga é usada, cada instância de fluxo de trabalho que solicita esse tipo de extensão receberá uma nova instância da extensão.When this overload is used, each workflow instance that requests this extension type will get a new instance of the extension. Se uma extensão singleton for desejada, use a outra Add sobrecarga.If a singleton extension is desired, use the other Add overload.

Se qualquer uma das Add sobrecargas for chamada depois MakeReadOnly , um InvalidOperationException será lançado.If any of the Add overloads are called after MakeReadOnly, an InvalidOperationException is thrown.

Aplica-se a