C# Class SonarLint.VisualStudio.Integration.WPF.ContextualCommandViewModel

View model for a command with fixed context that is required during command execution
Inheritance: ViewModelBase
Exibir arquivo Open project: SonarSource-VisualStudio/sonarlint-visualstudio Class Usage Examples

Private Properties

Property Type Description
CanExecute bool
Execute void
SetDynamicDisplayText void
SetDynamicIcon void

Public Methods

Method Description
ContextualCommandViewModel ( object fixedContext, ICommand command ) : System

Creates an instance of contextual command view model

SetCommand ( ICommand realCommand ) : void

Private Methods

Method Description
CanExecute ( ) : bool
Execute ( ) : void
SetDynamicDisplayText ( string>.Func getDisplayText ) : void
SetDynamicIcon ( IconViewModel>.Func getIconFunc ) : void

Method Details

ContextualCommandViewModel() public method

Creates an instance of contextual command view model
public ContextualCommandViewModel ( object fixedContext, ICommand command ) : System
fixedContext object Required context
command ICommand Optional real command to trigger and pass the fixed context to
return System

SetCommand() public method

public SetCommand ( ICommand realCommand ) : void
realCommand ICommand
return void