![]() |
VOOZH | about |
dotnet add package Franz.Common --version 2.2.7
NuGet\Install-Package Franz.Common -Version 2.2.7
<PackageReference Include="Franz.Common" Version="2.2.7" />
<PackageVersion Include="Franz.Common" Version="2.2.7" />Directory.Packages.props
<PackageReference Include="Franz.Common" />Project file
paket add Franz.Common --version 2.2.7
#r "nuget: Franz.Common, 2.2.7"
#:package Franz.Common@2.2.7
#addin nuget:?package=Franz.Common&version=2.2.7Install as a Cake Addin
#tool nuget:?package=Franz.Common&version=2.2.7Install as a Cake Tool
A foundational library in the Franz Framework designed to provide core utilities, dependency injection abstractions, and common extensions for .NET applications. This library is part of the private Franz Framework ecosystem, versioned as 1.2.65, and hosted on a private Azure NuGet feed.
IScopedDependency: Marker interface for services with a scoped lifetime.ISingletonDependency: Marker interface for services with a singleton lifetime.Important: Any service interface must inherit from either IScopedDependency or ISingletonDependency. Services that do not implement one of these interfaces will not be registered properly in the dependency injection system.
ISeeder: Interface for implementing database seeding logic.
Order: Determines the execution order of seeders.SeedAsync(): Defines the asynchronous method for data initialization.CollectionExtensions:
AddIfNotContainsAddRangeIsNullOrEmptyEnumerableExtensions:
ForEach.HostEnvironmentExtensions:
IsIntegrationIsValidationIsPreProductionCompany: Provides foundational business logic for managing company-related data.ProductGeneration: Handles logic for generating product-related data.Configure your NuGet client to access the private Azure feed:
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Use the .NET CLI to install:
dotnet add package Franz.Common
Use IScopedDependency and ISingletonDependency to simplify service registrations. Ensure that your service interfaces implement one of these dependencies.
public interface IScopedExampleService : IScopedDependency
{
void PerformScopedOperation();
}
public class ScopedExampleService : IScopedExampleService
{
public void PerformScopedOperation()
{
Console.WriteLine("Scoped operation executed.");
}
}
// Registration
services.AddScoped<IScopedExampleService, ScopedExampleService>();
public interface ISingletonExampleService : ISingletonDependency
{
string GetConfigValue();
}
public class SingletonExampleService : ISingletonExampleService
{
public string GetConfigValue() => "Singleton Config";
}
// Registration
services.AddSingleton<ISingletonExampleService, SingletonExampleService>();
Implement the ISeeder interface for database initialization:
public class ExampleSeeder : ISeeder
{
public int Order => 1;
public async Task SeedAsync()
{
Console.WriteLine("Seeding database...");
// Add your data seeding logic here
await Task.CompletedTask;
}
}
// Example usage
var seeders = serviceProvider.GetServices<ISeeder>()
.OrderBy(seeder => seeder.Order);
foreach (var seeder in seeders)
{
await seeder.SeedAsync();
}
var list = new List<int> { 1, 2, 3 };
// Check if list is null or empty
if (!list.IsNullOrEmpty())
{
Console.WriteLine("List contains elements.");
}
// Add an item if it doesn't exist
list.AddIfNotContains(4); // Adds 4
list.AddIfNotContains(1); // Does nothing
// Add a range of items
list.AddRange(new[] { 5, 6 });
var numbers = Enumerable.Range(1, 5);
// Perform an action for each element
numbers.ForEach(x => Console.WriteLine($"Processing {x}"));
if (hostEnvironment.IsIntegration())
{
Console.WriteLine("Running in the integration environment.");
}
else if (hostEnvironment.IsValidation())
{
Console.WriteLine("Running in the validation environment.");
}
else if (hostEnvironment.IsPreProduction())
{
Console.WriteLine("Running in the pre-production environment.");
}
This library is fully self-contained and serves as a core building block for the private Franz Framework.
This library is part of the private Franz Framework and is not publicly available. It is distributed exclusively through a private Azure NuGet feed.
Contributions are restricted to the Franz Framework development team. If you are authorized to contribute:
This library is private and governed by the Franz Framework's internal licensing terms. For licensing inquiries, please contact the framework's maintainers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on Franz.Common:
| Package | Downloads |
|---|---|
|
Franz.Common.Reflection
Shared utility library for the Franz Framework. |
|
|
Franz.Common.DependencyInjection
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Mediator
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Headers
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Serialization
Shared utility library for the Franz Framework. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.7 | 593 | 6/7/2026 |
| 2.2.6 | 606 | 6/6/2026 |
| 2.2.5 | 611 | 6/4/2026 |
| 2.2.4 | 584 | 6/3/2026 |
| 2.2.3 | 583 | 6/2/2026 |
| 2.2.2 | 593 | 6/2/2026 |
| 2.2.1 | 586 | 5/24/2026 |
| 2.1.4 | 485 | 4/27/2026 |
| 2.1.3 | 449 | 4/26/2026 |
| 2.1.2 | 451 | 4/26/2026 |
| 2.1.1 | 458 | 4/22/2026 |
| 2.0.2 | 463 | 3/30/2026 |
| 2.0.1 | 445 | 3/29/2026 |
| 1.7.8 | 460 | 3/2/2026 |
| 1.7.7 | 488 | 1/31/2026 |
| 1.7.6 | 504 | 1/22/2026 |
| 1.7.5 | 465 | 1/10/2026 |
| 1.7.4 | 478 | 12/27/2025 |
| 1.7.3 | 568 | 12/22/2025 |
| 1.7.2 | 552 | 12/21/2025 |