Table of Contents

Class Path

Namespace
Loehnert.Lisrt.Framework.Path
Assembly
Loehnert.Lisrt.dll

Represents a relative or absolute path, stored in a settings file.

public class Path : AbsoluteToRelativePathBase, INotifyPropertyChangedEx, INotifyPropertyChanged, IPath, IHasKey
Inheritance
PropertyChangedBase
Path
Implements
INotifyPropertyChangedEx
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Constructors

Path(string, ITranslation, string, SettingsBase, string)

Initializes a new instance of the Path class.

public Path(string key, ITranslation description, string settingsKey, SettingsBase settings, string relativeBasePath = null)

Parameters

key string

Unique key.

description ITranslation

Description for the path.

settingsKey string

Key of the setting to store the path. Usually use the OptionsSettingsProvider as provider for the setting.

settings SettingsBase

SettingsBase with the settingsKey.

relativeBasePath string

The relative base path or null if the Path should be absolute.

Remarks

The setting must be user-scoped.

Exceptions

ArgumentNullException

Thrown when any parameter (except relativeBasePath) is null.

ArgumentException

Thrown if the settingsKey in the settings is not a string.

KeyNotFoundException

Thrown if the settingsKey is not found.

Properties

BasePath

Gets the path base for the RelativePath. Empty if no relative path is used.

protected override string BasePath { get; }

Property Value

string

Description

Gets the translatable description.

public override ITranslation Description { get; }

Property Value

ITranslation

Key

Gets the unique key.

public override string Key { get; }

Property Value

string

RelativePath

Gets or sets the relative path or the absolute path if BasePath is null.

protected override string RelativePath { get; set; }

Property Value

string

Methods

Save()

Saves the settings.

public override void Save()

See Also