diff --git a/.filenesting.json b/.filenesting.json deleted file mode 100644 index 0b71966..0000000 --- a/.filenesting.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "help":"https://go.microsoft.com/fwlink/?linkid=866610" -} \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 0be41b1..b32de31 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,14 +1,16 @@ - + 3 - 0 - 0 - $(VersionMajor).$(VersionMinor).$(VersionPatch) + 1 + $([System.DateTime]::UtcNow.ToString("MMdd")) + $([System.DateTime]::UtcNow.ToString("HHmm")) + $(VersionMajor).$(VersionMinor).$(VersionPatch).$(VersionRevision) Development + $(VersionMajor).$(VersionMinor).$(VersionPatch) - + false latest recommended @@ -34,24 +36,28 @@ none - - BoBoBaSs84 - $(Author) - https://github.com/$(Author) - Copyright © $([System.DateTime]::UtcNow.Year) $(Author) - Contains relevant things for property one-way binding / two-way binding, for property change / changing notification and for collection change / changing notification. - - $(AssemblyName) - library;csharp;notification;common + + BoBoBaSs84 + https://github.com/BoBoBaSs84 + Copyright © $([System.DateTime]::UtcNow.Year) BoBoBaSs84 + This package contains relevant abstractions and implementations for one- and two-way binding of properties, for notifications about changed properties, for notifications about changed collections and for the Relay Command Pattern for synchronous and asynchronous operations. + BB84.Notifications + true + git + https://github.com/BoBoBaSs84/BB84.Notifications + BB84.Notifications + + + + icon.png + BB84.Notifications MIT https://github.com/BoBoBaSs84/BB84.Notifications README.md + https://github.com/BoBoBaSs84/BB84.Notifications/releases/tag/$(FileVersion) True - $(AssemblyName) - true - git - https://github.com/BoBoBaSs84/BB84.Notifications - $(AssemblyName) + library;csharp;notification;common + $(FileVersion) @@ -64,6 +70,7 @@ + diff --git a/README.md b/README.md index 8baff2c..151e7fa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![CI](https://github.com/BoBoBaSs84/BB84.Notifications/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/BoBoBaSs84/BB84.Notifications/actions/workflows/ci.yml) [![Docs](https://github.com/BoBoBaSs84/BB84.Notifications/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/BoBoBaSs84/BB84.Notifications/actions/workflows/docs.yml) [![CodeQL](https://github.com/BoBoBaSs84/BB84.Notifications/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/BoBoBaSs84/BB84.Notifications/actions/workflows/codeql.yml) +[![C#](https://img.shields.io/badge/12.0-239120?logo=csharp&logoColor=white&labelColor=gray)](https://github.com/BoBoBaSs84/BB84.Notifications) [![Issues](https://img.shields.io/github/issues/BoBoBaSs84/BB84.Notifications)](https://github.com/BoBoBaSs84/BB84.Notifications/issues) [![Commit](https://img.shields.io/github/last-commit/BoBoBaSs84/BB84.Notifications)](https://github.com/BoBoBaSs84/BB84.Notifications/commit/main) [![License](https://img.shields.io/github/license/BoBoBaSs84/BB84.Notifications)](https://github.com/BoBoBaSs84/BB84.Notifications/blob/main/LICENSE) @@ -8,18 +9,18 @@ # BB84.Notifications -Contains relevant things for property one-way binding / two-way binding, for property change / changing notification and for collection change / changing notification. +This repository contains relevant abstractions and implementations for one- and two-way binding of properties, for notifications about changed properties, for notifications about changed collections and for the Relay Command Pattern for synchronous and asynchronous operations. ## Usage Depending on the application, there are several ways to skin a cat. -### The bindable property class and interfaces +### The notifiable property class and interface Designed with one or two way binding in mind. ```csharp -public IBindableProperty BindableInt { get; set; } = new BindableProperty(default); +public INotifiableProperty NotifiableInt { get; set; } = new NotifiableProperty(default); ``` If the property is changed, the `PropertyChangingEventHandler` is triggered before the value changes and the `PropertyChangedEventHandler` is triggered after the value has changed. @@ -27,14 +28,14 @@ If the property is changed, the `PropertyChangingEventHandler` is triggered befo - The `PropertyChangingEventHandler` contains via the `PropertyChangingEventArgs` the name of the property that is changing and when casted to `PropertyChangingEventArgs` the old value of the property. - The `PropertyChangedEventHandler` contains via the `PropertyChangedEventArgs` the name of the property that has changed and when casted to `PropertyChangedEventArgs` the new value of the property. -Further implementation possibilities can be achieved with the help of the `IBindableProperty` interface. +Further implementation possibilities can be achieved with the help of the `INotifiableProperty` interface. -### The notification property base class and interfaces +### The notifiable object base class and interface -Designed to handle changes at the class level and propagate them forward to the outside. +Designed to handle changes at the class level and propagate them. ```csharp -public sealed class TestClass : NotifyPropertyBase +public sealed class TestClass : NotifiableObject { private int _property; @@ -51,14 +52,14 @@ If the property is changed, the `PropertyChangingEventHandler` is triggered befo - The `PropertyChangingEventHandler` contains via the `PropertyChangingEventArgs` the name of the property that is changing and when casted to `PropertyChangingEventArgs` the old value of the property. - The `PropertyChangedEventHandler` contains via the `PropertyChangedEventArgs` the name of the property that has changed and when casted to `PropertyChangedEventArgs` the new value of the property. -Further implementation possibilities can be achieved with the help of the `INotifyPropertyBase` interface. +Further implementation possibilities can be achieved with the help of the `INotifiableObject` interface. -### The notification collection base class and interfaces +### The notifiable collection base class and interface -The `NotifyCollectionBase` class provides methods to handle the change within a collection and propagate it to the outside. +The `NotifiableCollection` class provides methods to handle the change within a collection and propagate it to the outside. ```csharp -public sealed class MyStringCollection : NotifyCollectionBase, ICollection +public sealed class MyStringCollection : NotifiableCollection, ICollection { private readonly Collection _collection; @@ -74,7 +75,7 @@ Most of the implementation must be done despite the base class itself. The inten - The `CollectionChangingEventHandler` contains via the `CollectionChangingEventArgs` the `CollectionChangeAction` and when casted to `CollectionChangingEventArgs` the old value of the object. - The `CollectionChangedEventHandler` contains via the `CollectionChangedEventArgs` the `CollectionChangeAction` and when casted to `CollectionChangedEventArgs` the new value of the object. -Further implementation possibilities can be achieved with the interfaces `INotifyCollectionChanged` and `INotifyCollectionChanging`. +Further implementation possibilities can be achieved with the `INotifiableCollection` interface or the `INotifyCollectionChanged` and `INotifyCollectionChanging` interfaces. ### The notification attributes diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..a38aff9 Binary files /dev/null and b/icon.png differ