Class FieldsViewModelBase
Base implementation of IFieldsDataContext used to create a bug.
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public abstract class FieldsViewModelBase : BindableBase, INotifyPropertyChanged, IFieldsViewModel, IAttachmentsViewModel, IDisposable
Constructors
View SourceFieldsViewModelBase(Dispatcher)
Initializes a new instance of the FieldsViewModelBase class.
Declaration
public FieldsViewModelBase(Dispatcher dispatcher)
Parameters
Type | Name | Description |
---|---|---|
Dispatcher | dispatcher | The dispatcher. |
Properties
View SourceAreTokensReadOnly
Gets a value indicating whether tokens are read only.
Declaration
public static bool AreTokensReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
Attachments
Gets the collection of attachments.
Declaration
public ObservableCollection<AttachmentViewModel> Attachments { get; }
Property Value
Type | Description |
---|---|
ObservableCollection<AttachmentViewModel> |
BugServiceClient
Gets access to the IBugServiceClient
Declaration
protected IBugServiceClient BugServiceClient { get; }
Property Value
Type | Description |
---|---|
IBugServiceClient |
CachedView
Gets or sets the cached view for the view model.
Declaration
public FrameworkElement CachedView { get; set; }
Property Value
Type | Description |
---|---|
FrameworkElement |
CanEdit
Gets a value indicating whether fields can be edited.
Declaration
public abstract bool CanEdit { get; }
Property Value
Type | Description |
---|---|
bool |
Dispatcher
Gets the current dispatcher.
Declaration
protected Dispatcher Dispatcher { get; }
Property Value
Type | Description |
---|---|
Dispatcher |
DynamicContent
Gets or sets the dynamic content for this view model.
Declaration
public FrameworkElement DynamicContent { get; set; }
Property Value
Type | Description |
---|---|
FrameworkElement |
DynamicContentForDisplay
Gets the dynamic content to display.
Declaration
public FrameworkElement DynamicContentForDisplay { get; }
Property Value
Type | Description |
---|---|
FrameworkElement |
EventAggregator
Gets the event aggregator.
Declaration
protected IEventAggregator EventAggregator { get; }
Property Value
Type | Description |
---|---|
IEventAggregator |
ExceptionHandler
Gets function to handle exceptions.
Declaration
protected Func<Exception, bool, string, Task> ExceptionHandler { get; }
Property Value
Type | Description |
---|---|
Func<Exception, bool, string, Task> |
Fields
Gets or sets the fields managed by this. The key is the field name.
Declaration
public IDictionary<string, FieldViewModel> Fields { get; protected set; }
Property Value
Type | Description |
---|---|
IDictionary<string, FieldViewModel> |
HasAutoAttachments
Gets a value indicating whether the template had attachments to auto attach.
Declaration
public bool HasAutoAttachments { get; }
Property Value
Type | Description |
---|---|
bool |
HasMetdataAutoAttachments
Gets a value indicating whether the template had metadata attachments to auto attach.
Declaration
public bool HasMetdataAutoAttachments { get; }
Property Value
Type | Description |
---|---|
bool |
HasValidData
Gets a value indicating whether the data is valid.
Declaration
public bool HasValidData { get; }
Property Value
Type | Description |
---|---|
bool |
IsAutoCapturing
Gets or sets a value indicating whether attachments are currently being auto updated.
Declaration
public bool IsAutoCapturing { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsExistingBug
Gets a value indicating whether there is an existing bug.
Declaration
public static bool IsExistingBug { get; }
Property Value
Type | Description |
---|---|
bool |
IsInDesignMode
Gets a value indicating whether the module is in design mode.
Declaration
public abstract bool IsInDesignMode { get; }
Property Value
Type | Description |
---|---|
bool |
IsPrivateTemplate
Gets a value indicating whether the template is private.
Declaration
public static bool IsPrivateTemplate { get; }
Property Value
Type | Description |
---|---|
bool |
IsTemplateDirty
Gets a value indicating whether the template is dirty.
Declaration
public bool IsTemplateDirty { get; }
Property Value
Type | Description |
---|---|
bool |
MediaProvider
Gets or sets the media provider.
Declaration
public IMediaProvider MediaProvider { get; set; }
Property Value
Type | Description |
---|---|
IMediaProvider |
OriginalTagsFromDatabase
Gets the list of tags pulled from the database.
Declaration
protected List<string> OriginalTagsFromDatabase { get; }
Property Value
Type | Description |
---|---|
List<string> |
RefreshAllAutoAttachmentsCommand
Gets the command to refresh all auto attachments.
Declaration
public ICommand RefreshAllAutoAttachmentsCommand { get; }
Property Value
Type | Description |
---|---|
ICommand |
RefreshAllMetadataAutoAttachmentsCommand
Gets the command to refresh all auto attachments.
Declaration
public ICommand RefreshAllMetadataAutoAttachmentsCommand { get; }
Property Value
Type | Description |
---|---|
ICommand |
RefreshFailedAutoAttachmentsCommand
Gets the command to refresh the failed auto attachments.
Declaration
public ICommand RefreshFailedAutoAttachmentsCommand { get; }
Property Value
Type | Description |
---|---|
ICommand |
RefreshFailedMetadataAutoAttachmentsCommand
Gets the command to refresh the failed auto attachments.
Declaration
public ICommand RefreshFailedMetadataAutoAttachmentsCommand { get; }
Property Value
Type | Description |
---|---|
ICommand |
SharedInfo
Gets or sets the view model shared info.
Declaration
public ViewModelSharedInfo SharedInfo { get; set; }
Property Value
Type | Description |
---|---|
ViewModelSharedInfo |
StoreProvider
Gets access to the IDataStoreProvider from SharedInfo.
Declaration
protected IDataStoreProvider StoreProvider { get; }
Property Value
Type | Description |
---|---|
IDataStoreProvider |
TagsControlVM
Gets the TagsControlViewModel associated with this bug.
Declaration
public TagsControlViewModel TagsControlVM { get; }
Property Value
Type | Description |
---|---|
TagsControlViewModel |
TemplateViewModel
Gets or sets the template view model.
Declaration
public TemplateViewModel TemplateViewModel { get; set; }
Property Value
Type | Description |
---|---|
TemplateViewModel |
TokenParser
Gets a function that can be used to parse a string into tokenized items.
Declaration
public Func<string, List<TokenizedItemViewModel>> TokenParser { get; }
Property Value
Type | Description |
---|---|
Func<string, List<TokenizedItemViewModel>> |
TokenResolverRegistry
Gets or sets access to the TokenResolverRegistry
Declaration
public TokenResolverRegistry TokenResolverRegistry { get; set; }
Property Value
Type | Description |
---|---|
TokenResolverRegistry |
ValidationErrorCommand
Gets the command for validation errors.
Declaration
public ICommand ValidationErrorCommand { get; }
Property Value
Type | Description |
---|---|
ICommand |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public virtual void Dispose()
InitializeAsync()
Initializes the view model asynchronously.
Declaration
public Task InitializeAsync()
Returns
Type | Description |
---|---|
Task | A task. |
InitializeBugServiceMultiselectFieldsAsync()
Initializes the connected bug client's multi-select fields.
Declaration
public Task InitializeBugServiceMultiselectFieldsAsync()
Returns
Type | Description |
---|---|
Task | A task. |
OnHasValidDataChanged()
Updates when the HasValidData changes
Declaration
protected virtual void OnHasValidDataChanged()
OnSharedInfoChanged(ViewModelSharedInfo, ViewModelSharedInfo)
Updates when the Shared Info changes
Declaration
protected virtual void OnSharedInfoChanged(ViewModelSharedInfo oldValue, ViewModelSharedInfo newValue)
Parameters
Type | Name | Description |
---|---|---|
ViewModelSharedInfo | oldValue | the old shared info |
ViewModelSharedInfo | newValue | the new shared info |
OnTemplatePropertyChanged(object, PropertyChangedEventArgs)
Updates when a template property changes
Declaration
protected virtual void OnTemplatePropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
object | sender | The event sender |
PropertyChangedEventArgs | e | The property changed event arguments. |
OnTemplateRevertedCompleted()
Updates attachment view models after a template has been reverted.
Declaration
protected void OnTemplateRevertedCompleted()
ReloadDynamicContent()
Declaration
public Task ReloadDynamicContent()
Returns
Type | Description |
---|---|
Task |
Uninitialize()
Uninitialize the Field View Model.
Declaration
public void Uninitialize()
UninitializeAsync()
Uninitialize the Field View Model.
Declaration
public Task UninitializeAsync()
Returns
Type | Description |
---|---|
Task | A Task. |
UpdateFields()
Declaration
protected virtual void UpdateFields()