добавлены не загруженные тесты
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Example.Shared">
|
||||||
|
<HintPath>..\mROA.Test\bin\Debug\net9.0\Example.Shared.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Example.Shared\Example.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System.Net;
|
||||||
|
using Example.Shared;
|
||||||
|
using mROA.Codegen;
|
||||||
|
using mROA.Implementation;
|
||||||
|
using mROA.Implementation.Bootstrap;
|
||||||
|
|
||||||
|
|
||||||
|
var bootstrap = new FullMixBuilder();
|
||||||
|
bootstrap.UseJsonSerialisation();
|
||||||
|
bootstrap.UseNetworkGateway(new IPEndPoint(IPAddress.Loopback, 4567));
|
||||||
|
bootstrap.UseStreamInteraction();
|
||||||
|
bootstrap.UseBasicExecution();
|
||||||
|
bootstrap.UseCollectableContextRepository(typeof(IPrinterFactory).Assembly);
|
||||||
|
bootstrap.SetupMethodsRepository(new CoCodegenMethodRepository());
|
||||||
|
bootstrap.Build();
|
||||||
|
|
||||||
|
var gateway = bootstrap.GetModule<IGatewayModule>();
|
||||||
|
|
||||||
|
gateway.Run();
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Example.Shared\Example.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
using Example.Shared;
|
||||||
|
using mROA.Codegen;
|
||||||
|
using mROA.Implementation;
|
||||||
|
using mROA.Implementation.Bootstrap;
|
||||||
|
|
||||||
|
var mixer = new FullMixBuilder();
|
||||||
|
|
||||||
|
mixer.Modules.Add(new FrontendContextRepository());
|
||||||
|
mixer.Modules.Add(new JsonFrontendSerialisationModule());
|
||||||
|
mixer.Modules.Add(new StreamBasedInteractionModule());
|
||||||
|
mixer.Modules.Add(new NetworkFrontendBridge(new IPEndPoint(IPAddress.Loopback, 4567)));
|
||||||
|
|
||||||
|
mixer.Build();
|
||||||
|
var context = mixer.GetModule<FrontendContextRepository>();
|
||||||
|
|
||||||
|
var factory = context.GetSingleObject(typeof(IPrinterFactory)) as IPrinterFactory;
|
||||||
|
|
||||||
|
var printer = factory.Create("Test");
|
||||||
|
var name = printer.Value.GetName();
|
||||||
|
Console.WriteLine("Printer name : {0}", name);
|
||||||
|
var page = printer.Value.Print("Test Page");
|
||||||
|
var data = page.Value.GetData();
|
||||||
|
Console.WriteLine("Data : {0}", Encoding.UTF8.GetString(data));
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\mROA.Codegen\mROA.Codegen.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||||
|
<ProjectReference Include="..\mROA\mROA.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user