Epiforge.Extensions.Components 1.7.0

dotnet add package Epiforge.Extensions.Components --version 1.7.0                
NuGet\Install-Package Epiforge.Extensions.Components -Version 1.7.0                
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="Epiforge.Extensions.Components" Version="1.7.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Epiforge.Extensions.Components --version 1.7.0                
#r "nuget: Epiforge.Extensions.Components, 1.7.0"                
#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 Epiforge.Extensions.Components as a Cake Addin
#addin nuget:?package=Epiforge.Extensions.Components&version=1.7.0

// Install Epiforge.Extensions.Components as a Cake Tool
#tool nuget:?package=Epiforge.Extensions.Components&version=1.7.0                

Property Change Notification

This library offers the PropertyChangeNotifier class, which you may inherit from to quickly get all the property utilities we're all tired of copying and pasting everywhere. Just call the protected OnPropertyChanged and OnPropertyChanging methods at the appropriate times from setters and compiler services will figure out what property you're in. Or, if all you need to do is set the value of a field, SetBackedProperty couldn't make it any easier or convenient to handle that as efficiently as possible. DynamicPropertyChangeNotifier is also available if your class needs to be dynamic.

Be sure to set the protected Logger property if you want the abstract class to log what's going on with property change notification.

Disposal

This library features base classes that handle things we've written a thousand times over, this time involving disposal. If you want to go with an implementation of the tried and true IDisposable, just inherit from SyncDisposable. Want a taste of the new IAsyncDisposable? Then, inherit from AsyncDisposable. Or, if you want to support both, there's Disposable. Additionally, if your object needs to be dynamic, you can use DynamicSyncDisposable, DynamicAsyncDisposable, or DynamicDisposable. Each of these features abstract methods to actually do your disposal. But all of the base classes feature:

  • proper implementation of the finalizer and use of GC.SuppressFinalize
  • monitored access to disposal to ensure it can't happen twice
  • the ability to override or "cancel" disposal by returning false from the abstract methods (e.g. you're reference counting and only want to dispose when your counter reaches zero)
  • a protected ThrowIfDisposed method you can call to before doing anything that requires you haven't been disposed
  • an IsDisposed property the value (and change notifications) of which are handled for you

This library provides the IDisposalStatus interface, which defines the IsDisposed property and all the base classes implement it. This library also provides the INotifyDisposing, INotifyDisposed, and INotifyDisposalOverridden interfaces, which add events that notify of these occurrences.

Be sure to set the protected Logger property if you want the abstract class to log what's going on with disposal.

Reflection

This library has useful tools for when you can't be certain of some things at compile time, such as types, methods, etc. While .NET reflection is immensely powerful, prior to .NET 7, it's not very quick. To address this, this library offers the following extension methods which will emit IL, generate delegates, and cache them for expedited use of Reflection:

  • ConstructorInfo.FastInvoke: call a constructor only known at runtime quickly
  • MethodInfo.FastInvoke: call a method only known at runtime quickly
  • PropertyInfo.FastGetValue: get the value of a property only known at runtime quickly
  • PropertyInfo.FastSetValue: set the value of a property only known at runtime quickly
  • Type.FastDefault: get the default value of a type only known at runtime quickly
  • Type.GetImplementationEvents: searches for the events of a type, including interfaces and interface inheritance
  • Type.GetImplementationMethods: searches for the methods of a type, including interfaces and interface inheritance
  • Type.GetImplementationProperties: searches for the properties of a type, including interfaces and interface inheritance

Use of these methods in .NET 7 or later will simply call the built-in methods, as they are now optimized.

This library also offers FastComparer and FastEqualityComparer, which implement IComparer and IEqualityComaprer, respectively, but quickly use the methods of Comparer<>.Default and EqualityComaprer<>.Default, respectively, to do their work.

In addition (pun intended), this library offers GenericAddition, GenericSubtraction, GenericMultiplication, and GenericDivision, which will produce delegates that will perform the respective operations with values of supplied generic type arguments.

Exceptions

This library provides extension methods for dealing with exceptions:

  • GetFullDetails - creates a representation of an exception and all of its inner exceptions, including exception types, messages, and stack traces, and traversing multiple inner exceptions in the case of AggregateException and ReflectionTypeLoadException

Threading

This library provides classes for use in threading scenarios:

  • AsyncSynchronizationContext - A SynchronizationContext that uses the Task Parallel Library (TPL) to process callbacks asynchronously
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 is compatible.  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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework 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 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.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Epiforge.Extensions.Components:

Package Downloads
Epiforge.Extensions.Collections

This package assists in operating with collections.

Epiforge.Extensions.Expressions

This package assists in operating with expressions.

Epiforge.Extensions.Platforms.Windows

This package assists in Windows-platform specific operations.

Epiforge.Extensions.Frameworks.WPF

This package assists in developing WPF-based applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.7.0 208 12/30/2023
1.6.0 144 12/28/2023
1.5.0 304 8/18/2023
1.4.0 700 8/11/2023
1.3.2 201 8/10/2023
1.3.1 144 8/10/2023
1.3.0 172 7/20/2023
1.2.0 170 7/3/2023
1.1.1 166 6/25/2023
1.1.0 291 5/29/2023
1.0.0 162 5/28/2023

We added additional extension methods for disposal dependencies.