Search Results for

    Show / Hide Table of Contents

    Class MruManager

    API that manages a MRU (Most Recently Used files) table which is stored in the AppSettings file.

    Inheritance
    Object
    ViewModelCommon
    ViewModel
    MruManager
    Implements
    IMruManager
    IViewModel
    IProgressReporter
    IViewModelCommon
    INotifyDataErrorInfo
    IProgressReporterCommon
    INotifyPropertyChanged
    Inherited Members
    ViewModel.CreateProgressReporterFromUiThread()
    ViewModelCommon.TrySetValue<TValue>(TValue, TValue, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, TValue, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, TValue, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, TValue, IEqualityComparer<TValue>, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, Func<TValue, (T1, T2)<Boolean, IEnumerable<Object>>>, TValue, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, PropertyValidationDelegate<TValue>, TValue, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, Func<TValue, (T1, T2)<Boolean, IEnumerable<Object>>>, TValue, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, PropertyValidationDelegate<TValue>, TValue, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, Func<TValue, (T1, T2)<Boolean, IEnumerable<Object>>>, TValue, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValue<TValue>(TValue, PropertyValidationDelegate<TValue>, TValue, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueAsync<TValue>(TValue, TValue, Func<TValue, Task<(T1, T2)<Boolean, IEnumerable<Object>>>>, SetBackingFieldDelegate<TValue>, String)
    ViewModelCommon.TrySetValueAsync<TValue>(TValue, TValue, Func<TValue, Task<(T1, T2)<Boolean, IEnumerable<Object>>>>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValueAsync<TValue>(TValue, TValue, Func<TValue, Task<(T1, T2)<Boolean, IEnumerable<Object>>>>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueAsync<TValue>(TValue, TValue, PropertyValidationDelegateAsync<TValue>, SetBackingFieldDelegate<TValue>, String)
    ViewModelCommon.TrySetValueAsync<TValue>(TValue, TValue, PropertyValidationDelegateAsync<TValue>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValueAsync<TValue>(TValue, TValue, PropertyValidationDelegateAsync<TValue>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, TValue, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, TValue, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, TValue, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, TValue, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, Func<TValue, (T1, T2)<Boolean, IEnumerable<Object>>>, TValue, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, Func<TValue, (T1, T2)<Boolean, IEnumerable<Object>>>, TValue, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, Func<TValue, (T1, T2)<Boolean, IEnumerable<Object>>>, TValue, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, Func<TValue, (T1, T2)<Boolean, IEnumerable<Object>>>, TValue, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, PropertyValidationDelegate<TValue>, TValue, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, PropertyValidationDelegate<TValue>, TValue, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, PropertyValidationDelegate<TValue>, TValue, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilent<TValue>(TValue, PropertyValidationDelegate<TValue>, TValue, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, Func<TValue, Task<(T1, T2)<Boolean, IEnumerable<Object>>>>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, Func<TValue, Task<(T1, T2)<Boolean, IEnumerable<Object>>>>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, Func<TValue, Task<(T1, T2)<Boolean, IEnumerable<Object>>>>, SetBackingFieldDelegate<TValue>, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, Func<TValue, Task<(T1, T2)<Boolean, IEnumerable<Object>>>>, SetBackingFieldDelegate<TValue>, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, PropertyValidationDelegateAsync<TValue>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, PropertyValidationDelegateAsync<TValue>, SetBackingFieldDelegate<TValue>, ViewModelCommon.SetValueOptions, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, PropertyValidationDelegateAsync<TValue>, SetBackingFieldDelegate<TValue>, IEqualityComparer<TValue>, String)
    ViewModelCommon.TrySetValueSilentAsync<TValue>(TValue, TValue, PropertyValidationDelegateAsync<TValue>, SetBackingFieldDelegate<TValue>, String)
    ViewModelCommon.IsValueValid<TValue>(TValue, PropertyValidationDelegate<TValue>, String)
    ViewModelCommon.IsValueValidAsync<TValue>(TValue, PropertyValidationDelegateAsync<TValue>, String)
    ViewModelCommon.IsPropertyAttributeValid<TValue>(TValue, String)
    ViewModelCommon.ClearErrors(String)
    ViewModelCommon.PropertyHasError(String)
    ViewModelCommon.GetPropertyErrors(String)
    ViewModelCommon.PropertyChanged
    ViewModelCommon.OnPropertyChanged(String)
    ViewModelCommon.OnPropertyChanged(Object, Object, String)
    ViewModelCommon.GetErrors(String)
    ViewModelCommon.HasErrors
    ViewModelCommon.ErrorsChanged
    ViewModelCommon.OnProgress(ProgressData)
    ViewModelCommon.EnableIndterminateMode
    ViewModelCommon.DisableIndterminateMode
    ViewModelCommon.CreateProgressReporterFromCurrentThread()
    ViewModelCommon.OnProgressChanged(Double, Double)
    ViewModelCommon.OnProgressChanged(Double, Double, String)
    ViewModelCommon.IsReportingProgress
    ViewModelCommon.IsIndeterminate
    ViewModelCommon.ProgressText
    ViewModelCommon.ProgressValue
    ViewModelCommon.ProgressChanged
    ViewModelCommon.PropertyValueChanged
    ViewModelCommon.OnErrorsChanged(String)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: BionicCode.Utilities.Net
    Assembly: BionicCode.Utilities.Net.Wpf.dll
    Syntax
    public class MruManager : ViewModel, IMruManager, IViewModel, IProgressReporter, IViewModelCommon, INotifyDataErrorInfo, IProgressReporterCommon, INotifyPropertyChanged

    Constructors

    | Improve this Doc View Source

    MruManager()

    Default constructor

    Declaration
    public MruManager()

    Properties

    | Improve this Doc View Source

    InternalMostRecentlyUsedFiles

    The underlying collection that holds the MostRecentlyUsedFileItem elements.
    This collection is the source for the public MostRecentlyUsedFiles property, which is a ReadOnlyObservableCollection<T>.

    Declaration
    protected ObservableCollection<MostRecentlyUsedFileItem> InternalMostRecentlyUsedFiles { get; }
    Property Value
    Type Description
    ObservableCollection<MostRecentlyUsedFileItem>
    | Improve this Doc View Source

    MaxMostRecentlyUsedCount

    The maximum number of files that are kept in the MRU table.
    The default value is 10.

    Declaration
    public int MaxMostRecentlyUsedCount { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    When the limit is exceeded, the least recent used file will be removed from the MRU table every time a new file is added.
    The maximum allowed value is 100. The minimum allowed value is 1.

    | Improve this Doc View Source

    MostRecentlyUsedFile

    Gets the MRU file which is the last file added to the MRU table.

    Declaration
    public MostRecentlyUsedFileItem MostRecentlyUsedFile { get; }
    Property Value
    Type Description
    MostRecentlyUsedFileItem
    | Improve this Doc View Source

    MostRecentlyUsedFiles

    A ReadOnlyObservableCollection<T> collection of MostRecentlyUsedFileItem which contains the MRU files.

    Declaration
    public ReadOnlyObservableCollection<MostRecentlyUsedFileItem> MostRecentlyUsedFiles { get; }
    Property Value
    Type Description
    ReadOnlyObservableCollection<MostRecentlyUsedFileItem>

    Methods

    | Improve this Doc View Source

    AddMostRecentlyUsedFile(String)

    Adds a file with the specified path to the MRU table.

    Declaration
    public void AddMostRecentlyUsedFile(string filePath)
    Parameters
    Type Name Description
    String filePath

    The path to the file which is to add to the MRU table.

    Remarks

    Checks if the file exists. Does nothing if file doesn't exist. When the number of files in the MRU table exceeds the limit set by MaxMostRecentlyUsedCount the entry with the least recent access is removed from the table.

    | Improve this Doc View Source

    Clear()

    Clears the MRU list.

    Declaration
    public void Clear()
    | Improve this Doc View Source

    IsMruCountValid(Int32)

    Property validation delegate. Validates the MaxMostRecentlyUsedCount property values.

    Declaration
    protected virtual (bool IsValid, IEnumerable<object> ErrorMessages) IsMruCountValid(int count)
    Parameters
    Type Name Description
    Int32 count

    The max count value for MaxMostRecentlyUsedCount to validate.

    Returns
    Type Description
    System.ValueTuple<Boolean, IEnumerable<Object>>
    | Improve this Doc View Source

    OnFileAdded(MostRecentlyUsedFileItem, MostRecentlyUsedFileItem)

    Called when the InternalMostRecentlyUsedFiles has changed.

    Declaration
    protected virtual void OnFileAdded(MostRecentlyUsedFileItem oldItem, MostRecentlyUsedFileItem newItem)
    Parameters
    Type Name Description
    MostRecentlyUsedFileItem oldItem

    The removed MostRecentlyUsedFileItem item.

    MostRecentlyUsedFileItem newItem

    The newly added MostRecentlyUsedFileItem item.

    Events

    | Improve this Doc View Source

    FileAdded

    Raised when a new file was added to the MRU list. The event args contains the old and the new MostRecentlyUsedFileItem.
    Once the max MostRecentlyUsedFileItem limit is reached, the least used file will be removed from the list to make space for the new item.
    In this case the OldValue is the removed oldest item in the list.
    Otherwise OldValue will be null.

    Declaration
    public event EventHandler<ValueChangedEventArgs<MostRecentlyUsedFileItem>> FileAdded
    Event Type
    Type Description
    EventHandler<ValueChangedEventArgs<MostRecentlyUsedFileItem>>

    Implements

    IMruManager
    IViewModel
    IProgressReporter
    IViewModelCommon
    INotifyDataErrorInfo
    IProgressReporterCommon
    INotifyPropertyChanged

    Extension Methods

    HelperExtensionsCommon.ToDictionary(Object)
    HelperExtensionsCommon.ToFlatDictionary(Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX