Wlvyr.Common.Interface 0.2.1

dotnet add package Wlvyr.Common.Interface --version 0.2.1
                    
NuGet\Install-Package Wlvyr.Common.Interface -Version 0.2.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="Wlvyr.Common.Interface" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wlvyr.Common.Interface" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Wlvyr.Common.Interface" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Wlvyr.Common.Interface --version 0.2.1
                    
#r "nuget: Wlvyr.Common.Interface, 0.2.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.
#:package Wlvyr.Common.Interface@0.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Wlvyr.Common.Interface&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Wlvyr.Common.Interface&version=0.2.1
                    
Install as a Cake Tool

Wlvyr.Common.Interface

Wlvyr.Common.Interface is a library that contains only interfaces used in Wlvyr.Common, aiming to decouple Wlvyr.Common from projects that only require the interfaces.

Dependency Injection

To help facilitate in loading dependency injection (DI) service across different projects, Wlvyr.Common.Interface.Configuration.IDIConfig<TContainer, TSettings> provides an interface in configuring your DI in all required projects. Then, binding and initializing the DI configurations from Wlvyr.Common.Configuration.DIBootstrap<TContainer, TAppSettings>.

In a project that may not require Wlvyr.Common but only its interface, Wlvyr.Common.Interface, an implementation of IDIConfig will look like this:


using SimpleInjector;

using Wlvyr.Common.Interface.Configuration;

namespace SomeProject;

public class SomeDIConfig : IDIConfig<Container, SomeAppSetting> {

    public void Configure(Container container, SomeAppSetting configuration){
        container.Register<ILogger, FileLogger>();
    }
}

Please see Wlvyr.Common to see how IDIConfig is used.

Mapper

Allow projects to define their own mapping configuration. The project doesn't require AutoMapper to be used, but is based on it. To setup, get all Wlvyr.Common.Interface.Configuration.IMapperConfig<TConfigurer> implementations, from relevant workspace projects, and then initialize.

In a project that may not require Wlvyr.Common but only its interface, Wlvyr.Common.Interface, an implementation of IMapperConfig will look like this:


using SimpleInjector;

using Wlvyr.Common.Interface.Configuration;

namespace SomeProject;

public class SomeMapperConfig : IMapperConfig<MapperConfigurationExpression> {

    public void Configure(MapperConfigurationExpression cfg){
        cfg.CreateMap<Employee, EmployeeDTO>();
    }
}

// If appSettings is not included in assemblies.CreateMapperConfigs<MapperConfigurationExpression>(), this will not be included.
public class SomeMapperConfigWithAppSettingParam : IMapperConfig<MapperConfigurationExpression> {

    public SomeMapperConfigWithAppSettingParam(AppSettings appSettings){
        this.AppSettings = appSettings;

    }
    
    protected AppSettings AppSettings { get; init; } 

    public void Configure(MapperConfigurationExpression cfg){
        cfg.CreateMap<Employee, EmployeeDTO>();
    }
}

Please see Wlvyr.Common to see how IMapperConfig is used.

Product 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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Wlvyr.Common.Interface:

Package Downloads
Wlvyr.Common

This library aids in common project steps such (e.g. DI bootstrap).

Wlvyr.Common.Data

Wlvyr.Common.Data is a reusable library that provides an ADO.NET-agnostic abstraction for executing database operations.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.1 203 1/1/2026

- **0.2.1**: Updated project metadata and documentation
     - **0.2.0**:
       - Added AppEnvironment enum, used by IAppSettings
       - Breaking Changes
         - All interfaces are now in Wlvyr.Common.Interface.Configuration. (previously there were Wlvyr.Common.Interface.DI and Wlvyr.Common.Interface.Mapper)
         - IAppSettings
           - removed  IsProductionEnv property
           - removed  EnvironmentName property