Aracılığıyla paylaş


DelegateCommand<T> Oluşturucular

Tanım

Aşırı Yüklemeler

DelegateCommand<T>(Action<T>)

DelegateCommand<T> sınıfının yeni bir örneğini başlatır. DelegateCommand'ı başlatmak için bu oluşturucuyu kullanmak, her zaman yürütülebilen bir komutla sonuçlanabilir.

DelegateCommand<T>(Action<T>, Predicate<T>)

DelegateCommand<T> sınıfının yeni bir örneğini başlatır.

DelegateCommand<T>(Action<T>, Predicate<T>, JoinableTaskFactory)

DelegateCommand<T> sınıfının yeni bir örneğini başlatır.

DelegateCommand<T>(Action<T>)

DelegateCommand<T> sınıfının yeni bir örneğini başlatır. DelegateCommand'ı başlatmak için bu oluşturucuyu kullanmak, her zaman yürütülebilen bir komutla sonuçlanabilir.

public:
 DelegateCommand(Action<T> ^ execute);
public DelegateCommand (Action<T> execute);
new Microsoft.VisualStudio.PlatformUI.DelegateCommand<'T> : Action<'T> -> Microsoft.VisualStudio.PlatformUI.DelegateCommand<'T>
Public Sub New (execute As Action(Of T))

Parametreler

execute
Action<T>

Komut yürütürken çalıştırılacak eylem.

Şunlara uygulanır

DelegateCommand<T>(Action<T>, Predicate<T>)

DelegateCommand<T> sınıfının yeni bir örneğini başlatır.

public:
 DelegateCommand(Action<T> ^ execute, Predicate<T> ^ canExecute);
public DelegateCommand (Action<T> execute, Predicate<T> canExecute);
new Microsoft.VisualStudio.PlatformUI.DelegateCommand<'T> : Action<'T> * Predicate<'T> -> Microsoft.VisualStudio.PlatformUI.DelegateCommand<'T>
Public Sub New (execute As Action(Of T), canExecute As Predicate(Of T))

Parametreler

execute
Action<T>

Komut yürütürken çalıştırılacak eylem.

canExecute
Predicate<T>

Bu komutun yürütülebilir olup olmadığını değerlendiren işlev. Bu parametre null ise, komut her zaman yürütülebilir olur.

Şunlara uygulanır

DelegateCommand<T>(Action<T>, Predicate<T>, JoinableTaskFactory)

DelegateCommand<T> sınıfının yeni bir örneğini başlatır.

public:
 DelegateCommand(Action<T> ^ execute, Predicate<T> ^ canExecute, Microsoft::VisualStudio::Threading::JoinableTaskFactory ^ jtf);
public DelegateCommand (Action<T> execute, Predicate<T> canExecute, Microsoft.VisualStudio.Threading.JoinableTaskFactory jtf);
new Microsoft.VisualStudio.PlatformUI.DelegateCommand<'T> : Action<'T> * Predicate<'T> * Microsoft.VisualStudio.Threading.JoinableTaskFactory -> Microsoft.VisualStudio.PlatformUI.DelegateCommand<'T>
Public Sub New (execute As Action(Of T), canExecute As Predicate(Of T), jtf As JoinableTaskFactory)

Parametreler

execute
Action<T>

Komut yürütürken çalıştırılacak eylem.

canExecute
Predicate<T>

Bu komutun yürütülebilir olup olmadığını değerlendiren işlev. Bu parametre null ise, komut her zaman yürütülebilir olur.

jtf
JoinableTaskFactory

Komutun görev fabrikası. Bu null değilse, komut olayı oluşturmadan önce ana iş parçacığına CanExecuteChanged geçer.

Şunlara uygulanır