mirror of
https://github.com/wagesj45/butterflow-ui.git
synced 2025-09-09 03:00:39 -05:00
Added documentation.
This commit is contained in:
parent
329feaf342
commit
92f7229c96
4 changed files with 99 additions and 9 deletions
|
|
@ -28,8 +28,28 @@ namespace butterflow_ui
|
|||
|
||||
#region Methods
|
||||
|
||||
/// <summary> Executes the property changed action. </summary>
|
||||
/// <param name="name"> The name. </param>
|
||||
/// <summary>
|
||||
/// Executes the property changed action. This alerts subscribers to its change in value.
|
||||
/// </summary>
|
||||
/// <param name="name"> (Optional) The name of the property. </param>
|
||||
/// <example>
|
||||
/// This will automatically pass in "SomeProperty" as the property name, derived useing the
|
||||
/// <see cref="CallerMemberNameAttribute" /> attribute.
|
||||
/// <code lang="cs" title="Automatic Property Detection">
|
||||
/// public bool SomeProperty
|
||||
/// {
|
||||
/// get
|
||||
/// {
|
||||
/// return this.someProperty;
|
||||
/// }
|
||||
/// set
|
||||
/// {
|
||||
/// this.someProperty = value;
|
||||
/// OnPropertyChanged();
|
||||
/// }
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
protected virtual void OnPropertyChanged([CallerMemberName]string name = null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(name))
|
||||
|
|
@ -42,6 +62,7 @@ namespace butterflow_ui
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary> Executes when all properties are changed and should be updated. </summary>
|
||||
protected virtual void OnAllPropertiesChanged()
|
||||
{
|
||||
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(string.Empty));
|
||||
|
|
@ -51,7 +72,7 @@ namespace butterflow_ui
|
|||
/// <param name="name"> The name of the property. </param>
|
||||
public void AddConstantCallProperty(string name)
|
||||
{
|
||||
if(this.alwaysCall == null)
|
||||
if (this.alwaysCall == null)
|
||||
{
|
||||
// This item has been deserialized and the list needs to be reinitialized.
|
||||
this.alwaysCall = new List<string>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue