BB84.Notifications 1.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package BB84.Notifications --version 1.3.1                
NuGet\Install-Package BB84.Notifications -Version 1.3.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BB84.Notifications" Version="1.3.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BB84.Notifications --version 1.3.1                
#r "nuget: BB84.Notifications, 1.3.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BB84.Notifications as a Cake Addin
#addin nuget:?package=BB84.Notifications&version=1.3.1

// Install BB84.Notifications as a Cake Tool
#tool nuget:?package=BB84.Notifications&version=1.3.1                

CI Docs CodeQL Issues Commit Forks Size stars License

BB84.Notifications

Contains relevant things for property one-way binding / two-way binding, for property change / changing notification and for collection change / changing notification.

Usage

Depending on the application, there are several ways to skin a cat.

The bindable property class and interfaces

Designed with one or two way binding in mind.

public IBindableProperty<int> BindableInt { get; set; } = new BindableProperty<int>(default);

If the property is changed, the BindablePropertyChangingEventHandler<T> is triggered before the value changes and the BindablePropertyChangedEventHandler<T> is triggered after the value has changed.

  • The BindablePropertyChangingEventHandler<T> contains via the BindablePropertyChangingEventArgs the old value.
  • The BindablePropertyChangedEventHandler<T> contains via the BindablePropertyChangedEventArgs the new value.

Further implementation possibilities can be achieved with the help of the IBindableProperty interface.

The notification property base class and interfaces

Designed to handle changes at the class level and propagate them forward to the outside.

public sealed class TestClass : NotifyPropertyBase
{
    private int _property;

    public int Property
    {
        get => _property;
        set => SetProperty(ref _property, value);
    }
}

If the property is changed, the PropertyChangingEventHandler is triggered before the value changes and the PropertyChangedEventHandler is triggered after the value has changed.

  • The PropertyChangingEventHandler contains via the CollectionChangingEventArgs the name of the property that is changing and the old value.
  • The PropertyChangedEventHandler contains via the PropertyChangedEventArgs the name of the property that has changed and the new value.

Further implementation possibilities can be achieved using the INotifyPropertyChanged and INotifyPropertyChanging interfaces.

The notification collection base class and interfaces

The NotifyCollectionBase class provides methods to handle the change within a collection and propagate it to the outside.

public sealed class MyStringCollection : NotifyCollectionBase, ICollection<string>
{
  private readonly Collection<string> _collection;

  public MyStringCollection()
    => _collection = new Collection<string>();

  ..
}

Most of the implementation must be done despite the base class itself. The intention has been to be able to signal the state of a collection before (CollectionChangingEventHandler) or after (CollectionChangedEventHandler) the addition, deletion or modification of objects.

  • The CollectionChangingEventHandler contains via the CollectionChangingEventArgs the CollectionChangeAction and can contain the object before the change depending on the action.
  • The CollectionChangedEventHandler contains via the CollectionChangedEventArgs the CollectionChangeAction and can contain the object after the change depending on the action.

Further implementation possibilities can be achieved with the interfaces INotifyCollectionChanged and INotifyCollectionChanging.

Documentation

The API documentation can be found here.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.5.916 808 9/16/2024
3.4.715 787 7/15/2024
3.4.713 101 7/13/2024
3.3.616 300 6/16/2024
3.3.606 161 6/6/2024
3.2.603 117 6/3/2024
3.2.520 293 5/20/2024
3.2.421 242 4/21/2024
3.1.421 112 4/21/2024
3.1.415 184 4/15/2024
3.0.0 278 3/25/2024
2.1.1 316 2/6/2024
2.1.0 353 1/14/2024
2.0.0 179 1/9/2024
1.8.2 235 1/1/2024
1.8.1 221 11/20/2023
1.8.0 131 11/13/2023
1.7.0 119 11/12/2023
1.6.1 119 11/12/2023
1.6.0 119 11/12/2023
1.5.0 139 11/6/2023
1.4.0 127 11/3/2023
1.3.1 136 11/1/2023
1.3.0 132 11/1/2023
1.2.1 149 10/25/2023
1.2.0 133 10/23/2023
1.1.0 140 10/21/2023
1.0.1 137 10/21/2023
1.0.0 132 10/21/2023