Franz.Common.Reflection
1.2.62
dotnet add package Franz.Common.Reflection --version 1.2.62
NuGet\Install-Package Franz.Common.Reflection -Version 1.2.62
<PackageReference Include="Franz.Common.Reflection" Version="1.2.62" />
paket add Franz.Common.Reflection --version 1.2.62
#r "nuget: Franz.Common.Reflection, 1.2.62"
// Install Franz.Common.Reflection as a Cake Addin #addin nuget:?package=Franz.Common.Reflection&version=1.2.62 // Install Franz.Common.Reflection as a Cake Tool #tool nuget:?package=Franz.Common.Reflection&version=1.2.62
Franz.Common.Reflection
A utility library within the Franz Framework that provides reflection-based tools to simplify and enhance application development. This package includes helper classes, extensions, and abstractions for working with assemblies, types, and dependency injection.
Features
- Assembly Utilities:
AssemblyWrapper
andAssemblyAccessorWrapper
for wrapping and accessing assembly details.ReflectionHelper
for simplifying reflection-based operations.
- Interface Abstractions:
IAssembly
andIAssemblyAccessor
to standardize assembly interactions.
- Extension Methods:
AssemblyExtensions
,TypeExtensions
,ServiceCollectionExtensions
, andHostBuilderExtensions
for extending reflection and dependency injection capabilities.
- Flexible Integration:
- Provides a foundation for working with types and assemblies dynamically, enabling runtime configurations.
Version Information
- Current Version: 1.2.62
- Part of the private Franz Framework ecosystem.
Dependencies
This package has no additional external dependencies, making it lightweight and easy to integrate.
Installation
From Private Azure Feed
Since this package is hosted privately, configure your NuGet client:
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Install the package:
dotnet add package Franz.Common.Reflection --version 1.2.62
Usage
1. Work with Assemblies
Leverage AssemblyWrapper
to interact with assemblies:
using Franz.Common.Reflection;
var assemblyWrapper = new AssemblyWrapper(typeof(MyClass).Assembly);
var types = assemblyWrapper.GetExportedTypes();
foreach (var type in types)
{
Console.WriteLine(type.Name);
}
2. Extend Types
Use TypeExtensions
to simplify type-related operations:
using Franz.Common.Reflection.Extensions;
var properties = typeof(MyClass).GetPublicProperties();
foreach (var property in properties)
{
Console.WriteLine(property.Name);
}
3. Register Dependencies Dynamically
Use ServiceCollectionExtensions
to register types dynamically:
using Franz.Common.Reflection.Extensions;
services.RegisterAssemblyTypes(typeof(MyClass).Assembly, type =>
{
return type.IsClass && !type.IsAbstract;
});
4. Build Hosts Dynamically
Use HostBuilderExtensions
to dynamically configure host builders:
using Franz.Common.Reflection.Extensions;
var host = Host.CreateDefaultBuilder(args)
.ConfigureDynamicServices(services =>
{
services.RegisterAssemblyTypes(typeof(MyClass).Assembly);
})
.Build();
Integration with Franz Framework
The Franz.Common.Reflection package integrates seamlessly with the Franz Framework, providing foundational utilities for dynamic assembly and type handling. It is especially useful in scenarios where runtime configurations or advanced dependency injection are required.
Contributing
This package is part of a private framework. Contributions are limited to the internal development team. If you have access, follow these steps:
- Clone the repository.
- Create a feature branch.
- Submit a pull request for review.
License
This library is licensed under the MIT License. See the LICENSE
file for more details.
Changelog
Version 1.2.62
- Added
AssemblyWrapper
andAssemblyAccessorWrapper
for assembly management. - Introduced
ReflectionHelper
for simplifying reflection-based tasks. - Provided
TypeExtensions
for enhanced type operations. - Added
ServiceCollectionExtensions
andHostBuilderExtensions
for dynamic dependency injection and host configuration.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Franz.Common (>= 1.2.62)
- Franz.Common.Errors (>= 1.2.62)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Franz.Common.Reflection:
Package | Downloads |
---|---|
Franz.Common.DependencyInjection
Shared utility library for the Franz Framework. |
|
Franz.Common.EntityFramework
Shared utility library for the Franz Framework. |
|
Franz.Common.Hosting
Shared utility library for the Franz Framework. |
|
Franz.Common.Http.Client
Shared utility library for the Franz Framework. |
|
Franz.Common.Http.Documentation
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.62 | 127 | 1/8/2025 |