Skip to content

Commit

Permalink
Add a sample app.
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Dec 21, 2024
1 parent 671fab6 commit edf0f0b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Cogito.Components.Sample1/Cogito.Components.Sample1.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net481;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cogito.Autofac.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Cogito.Extensions.Logging.Autofac" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Cogito.Components\Cogito.Components.csproj" />
</ItemGroup>

</Project>
19 changes: 19 additions & 0 deletions src/Cogito.Components.Sample1/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System.Threading.Tasks;

using Cogito.Autofac;
using Cogito.Autofac.DependencyInjection;

using Microsoft.Extensions.Hosting;

namespace Cogito.Components.Sample1
{

public static class Program
{
public static async Task Main(string[] args) => await Host.CreateDefaultBuilder(args)
.UseServiceProviderFactory(new AutofacServiceProviderFactory(b => b.RegisterAllAssemblyModules()))
.RunConsoleAsync();

}

}

0 comments on commit edf0f0b

Please sign in to comment.