Table of Contents

Class ReferencesViewModel

Namespace
Loehnert.Lisrt.Scripting.Editor.File.ViewModels
Assembly
Loehnert.Lisrt.Scripting.dll

Represents a view model for a 'Find all references' tool.

public class ReferencesViewModel : Tool, IViewAware, IChild, ITool, ILayoutItem, IScreen, IHaveDisplayName, IActivate, IDeactivate, IGuardClose, IClose, INotifyPropertyChangedEx, INotifyPropertyChanged
Inheritance
PropertyChangedBase
ViewAware
Screen
ReferencesViewModel
Implements
IViewAware
IChild
IScreen
IHaveDisplayName
IActivate
IDeactivate
IGuardClose
IClose
INotifyPropertyChangedEx
Derived
Inherited Members
Screen.OnInitialize()
Screen.OnActivate()
Screen.Parent
Screen.IsActive
Screen.IsInitialized
Screen.Activated
Screen.AttemptingDeactivation
Screen.Deactivated
ViewAware.DefaultContext
ViewAware.Views
ViewAware.ViewAttached
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Constructors

ReferencesViewModel(IScriptShell, IEnumerable<IEditorFactory>)

Initializes a new instance of the ReferencesViewModel class.

public ReferencesViewModel(IScriptShell scriptShell, IEnumerable<IEditorFactory> editorFactories)

Parameters

scriptShell IScriptShell

Script shell where a reference is open.

editorFactories IEnumerable<IEditorFactory>

Factories to create an editor of ProjectItem.

Properties

Definitions

Gets the definition view models.

public IEnumerable<DefinitionViewModel> Definitions { get; }

Property Value

IEnumerable<DefinitionViewModel>

DisplayName

Gets or Sets the display name. Do not set this property.

public override string DisplayName { get; set; }

Property Value

string

OpenRefernceCommand

Gets a command to open a reference.

public ICommand OpenRefernceCommand { get; }

Property Value

ICommand

PreferredLocation

Gets the preferred tool location.

public override PaneLocation PreferredLocation { get; }

Property Value

PaneLocation

ReferencedItem

Gets or sets the name of the referenced item.

public string ReferencedItem { get; set; }

Property Value

string

ToolTitle

Gets a translated tool title. {0} is replaced by ReferencedItem.

protected virtual ITranslation ToolTitle { get; }

Property Value

ITranslation

Methods

SetDefinitions(IEnumerable<IDefinition>)

Sets the definitions of references.

public void SetDefinitions(IEnumerable<IDefinition> definitions)

Parameters

definitions IEnumerable<IDefinition>

Definitions to show.

Exceptions

ArgumentNullException

Thrown when definitions is null.