Click or drag to resize

MruManager Class

API that manages a MRU (Most Recently Used files) table which is stored in the AppSettings file.
Inheritance Hierarchy
System.Object
  BionicCode.Utilities.Net.Standard.ViewModel.ViewModel
    BionicCode.Utilities.Net.Framework.Wpf.Settings.MruManager

Namespace:  BionicCode.Utilities.Net.Framework.Wpf.Settings
Assembly:  BionicCode.Utilities.Net.Framework.Wpf (in BionicCode.Utilities.Net.Framework.Wpf.dll) Version: 1.0.3.0 (1.0.0.0)
Syntax

The MruManager type exposes the following members.

Constructors
  NameDescription
Public methodMruManager
Default constructor
Top
Properties
  NameDescription
Public propertyHasErrors
Gets a value that indicates whether the entity has validation errors.
(Inherited from ViewModel.)
Protected propertyInternalMostRecentlyUsedFiles
Public propertyMaxMostRecentlyUsedCount
The maximum number of files that are kept in the MRU table.
The default value is 10.
Public propertyMostRecentlyUsedFile
Gets the MRU file which is the last file added to the MRU table.
Public propertyMostRecentlyUsedFiles
Top
Methods
  NameDescription
Public methodAddMostRecentlyUsedFile
Adds a file with the specified path to the MRU table.
Public methodClear
Clears the MRU list.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetErrors
Gets all error messages of the specified property. If the propertyName is null all error messages will be returned.
(Inherited from ViewModel.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPropertyErrors
Gets all error messages of the specified property. If the propertyName is null all error messages will be returned.
(Inherited from ViewModel.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodIsMruCountValid
Property validation delegate. Validates the MaxMostRecentlyUsedCount property values.
Protected methodIsValueValid<TValue>
Can be used to check whether a value is valid.
(Inherited from ViewModel.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnErrorsChanged
Raised when the validation state of the view model has changed (e.g. error added or removed).
(Inherited from ViewModel.)
Protected methodOnFileAdded
Called when the InternalMostRecentlyUsedFiles has changed.
Protected methodOnPropertyChanged
Method called to fire a PropertyChanged event. Also raises the PropertyChanged event to support binding.
(Inherited from ViewModel.)
Public methodPropertyHasError
Checks whether the specified property has errors or is valid.
(Inherited from ViewModel.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodTrySetValue<TValue>(TValue, TValue, String)
Generic property setter. Sets the value of any property of the extending view model by passing in a the corresponding property backing field. Automatically raises the PropertyChanged event for this property.
(Inherited from ViewModel.)
Protected methodTrySetValue<TValue>(TValue, Func<TValue, ValueTuple<Boolean, IEnumerable<String>>>, TValue, Boolean, Boolean, String)
Sets the value of the referenced property and executes a validation delegate.
(Inherited from ViewModel.)
Protected methodTrySetValueSilent<TValue>(TValue, TValue, String)
Generic property setter. Silently sets the value of any property of the extending view model by passing in a the corresponding property backing field. Suppresses a PropertyChanged event for this property.
(Inherited from ViewModel.)
Protected methodTrySetValueSilent<TValue>(TValue, Func<TValue, ValueTuple<Boolean, IEnumerable<String>>>, TValue, Boolean, Boolean, String)
Silently sets the value of the referenced property without raising PropertyChanged and executes a validation delegate.
(Inherited from ViewModel.)
Top
Events
  NameDescription
Public eventErrorsChanged
Occurs when the validation errors have changed for a property or for the entire entity.
(Inherited from ViewModel.)
Public eventFileAdded
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.
Public eventPropertyChanged
Event fired whenever a child property changes its value.
(Inherited from ViewModel.)
Public eventPropertyValueChanged
PropertyChanged implementation that sends old value and new value of the change and raises the INotifyPropertyChanged event.
(Inherited from ViewModel.)
Top
Extension Methods
See Also
https://github.com/BionicCode/BionicCode.Net/blob/master/README.md