NativeActivity Construtor
Definição
Quando implementado em uma classe derivada, cria uma nova instância da classe derivada.When implemented in a derived class, creates a new instance of the derived class.
protected:
NativeActivity();
protected NativeActivity ();
Protected Sub New ()
Exemplos
O exemplo de código a seguir demonstra como criar uma classe que herda de NativeActivity<TResult> .The following code sample demonstrates creating a class that inherits from NativeActivity<TResult>. Este exemplo é da composição personalizada usando a amostra de atividade nativa.This example is from the Custom Composite using Native Activity sample.
public sealed class MySequence : NativeActivity
{
Collection<Activity> children;
Collection<Variable> variables;
Variable<int> currentIndex;
CompletionCallback onChildComplete;
public MySequence()
: base()
{
this.children = new Collection<Activity>();
this.variables = new Collection<Variable>();
this.currentIndex = new Variable<int>();
}
public Collection<Activity> Activities
{
get
{
return this.children;
}
}
public Collection<Variable> Variables
{
get
{
return this.variables;
}
}