Releases: IGood/boilerplatezero
Release v2.0.0
Updated implementations to use IIncrementalGenerator
.
This should be an overall performance improvement.
No functionality has changed.
A few other changes were made for optimizations & code maintenance.
Starting with this version, Visual Studio versions lower than VS2022 are no longer supported because the source generators have been reimplemented as IIncrementalGenerator
instead of ISourceGenerator
.
Version 1.* of this package should be used with VS2019.
Release v2.0.0-beta
Updated implementations to use IIncrementalGenerator
.
This should be an overall performance improvement.
No functionality has changed, but this means older versions of VS are not supported (they should continue to use the v1 releases of this source generator).
Also, a few other changes for code maintenance, optimizations, & dependency updates.
Release v1.8.0
Added support for validation (#17).
For a property named Foo
, a method named IsValidFoo
will be used (if it exists) by the property to perform validation.
See property features section in the readme for more details.
Added more generated documentation for "Gen" methods - now has info about associated methods/events for validation, coercion, & changes.
Release v1.7.2
fix for #18 - generated members always have documentation so the compiler doesn't complain at you
Release v1.7.1
fix for #15 wherein generated documentation didn't do the correct thing for references to constructed generic types
Release v1.7.0
If the name of a routed event matches the name of a dependency property, then it is a candidate for use the property's generated change-handler.
Example:
public static readonly DependencyProperty SeasonProperty = Gen.Season("summer");
// This event will be raised whenever the `Season` property changes because its name matches.
public static readonly RoutedEvent SeasonChangedEvent = Gen.SeasonChanged<string>();
Release v1.6.0
- BPZ does routed events!
Similar to dependency properties, routed events will be registered & implemented when static read-only fields are setup correctly.
The type of the event handler & the routing strategy can be specified if necessary (see readme for more details).
Write this, not that:
// 👩💻 👍 Write this (using BPZ):
public static readonly RoutedEvent SeasonChangedEvent = Gen.SeasonChanged<string>();
// 👩💻 👎 Not that (idiomatic implementation):
public static readonly RoutedEvent SeasonChangedEvent = EventManager.RegisterRoutedEvent(nameof(SeasonChanged), RoutingStrategy.Direct, typeof(RoutedPropertyChangedEventHandler<string>), typeof(MyClass));
public event RoutedPropertyChangedEventHandler<string> SeasonChanged
{
add => this.AddHandler(FooChangedEvent, value);
remove => this.RemoveHandler(FooChangedEvent, value);
}
Release v1.5.2
no functional changes; minor updates to formatting of generated code
Release v1.5.1
- minor update to formatting of generated code (added some indentation that was missing)
- properly checks for cancellation during code gen.
Release v1.5.0
Added support for FrameworkPropertyMetadataOptions
flags.
These flags may be specified with or without a property's default value, allowing for usage like...
// 👩💻 user
// No default value is provided, will be implemented using the default value for the generic type argument.
// In this case: `default(string?)` (which resolves to `null`).
public static readonly DependencyProperty TextProperty = Gen.Text<string?>(
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault);
// Default value argument is provided, as well as a flags argument.
public static readonly DependencyProperty ErrorBrushProperty = GenAttached.ErrorBrush<Brush>(
Brushes.Red,
FrameworkPropertyMetadataOptions.Inherits);