Changing references
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using mROA.Implementation;
|
||||
|
||||
namespace mROA.Benchmark;
|
||||
|
||||
public static class CborExtensions
|
||||
{
|
||||
public static unsafe void WriteToCbor(this RequestId id, CborWriter writer)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using mROA.Abstract;
|
||||
using mROA.Implementation.Attributes;
|
||||
|
||||
namespace mROA.Benchmark
|
||||
{
|
||||
[SharedObjectInterface]
|
||||
public interface ILoadTest : IShared
|
||||
{
|
||||
Task<int> Next(int last);
|
||||
int Last(int next);
|
||||
void C();
|
||||
void A();
|
||||
Task AsyncTest(CancellationToken token = default);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using mROA.Abstract;
|
||||
using mROA.Implementation.Attributes;
|
||||
|
||||
namespace mROA.Benchmark
|
||||
{
|
||||
[SharedObjectInterface]
|
||||
public interface IPage : IShared
|
||||
{
|
||||
byte[] GetData();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using mROA.Abstract;
|
||||
using mROA.Implementation;
|
||||
using mROA.Implementation.Attributes;
|
||||
|
||||
namespace mROA.Benchmark
|
||||
{
|
||||
[SharedObjectInterface]
|
||||
public partial interface IPrinter : IDisposable, IShared
|
||||
{
|
||||
double Resource { get; set; }
|
||||
string GetName();
|
||||
Task<IPage> Print(string text, bool someParameter, RequestContext context, CancellationToken cancellationToken);
|
||||
event Action<IPage, RequestContext> OnPrint;
|
||||
|
||||
[Untrusted]
|
||||
Task SomeoneIsApproaching(string humanName);
|
||||
|
||||
Task SetFingerPrint(int[] fingerPrint);
|
||||
Task IntTest(MyData data);
|
||||
}
|
||||
|
||||
public class MyData
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double Score { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{{{nameof(Id)}: {Id}, {nameof(Name)}: {Name}, {nameof(Score)}: {Score}}}";
|
||||
}
|
||||
|
||||
protected bool Equals(MyData other)
|
||||
{
|
||||
return Id == other.Id && Name == other.Name && Score.Equals(other.Score);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is null) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != GetType()) return false;
|
||||
return Equals((MyData)obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(Id, Name, Score);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using mROA.Abstract;
|
||||
using mROA.Implementation.Attributes;
|
||||
|
||||
namespace mROA.Benchmark
|
||||
{
|
||||
[SharedObjectInterface]
|
||||
public interface IPrinterFactory : IShared
|
||||
{
|
||||
IPrinter Create(string printerName);
|
||||
void Register(IPrinter printer);
|
||||
IPrinter GetPrinterByName(string printerName);
|
||||
IPrinter GetFirstPrinter();
|
||||
string[] CollectAllNames();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ using System.Formats.Cbor;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using mROA.Implementation;
|
||||
|
||||
namespace mROA.Benchmark;
|
||||
|
||||
[MemoryDiagnoser]
|
||||
public class RequestWriter
|
||||
{
|
||||
|
||||
@@ -9,19 +9,14 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Example.Shared\Example.Shared.csproj" />
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.15.2"/>
|
||||
<PackageReference Include="System.Formats.Cbor" Version="9.0.8"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\mROA.Cbor\mROA.Cbor.csproj"/>
|
||||
<ProjectReference Include="..\mROA.Codegen\mROA.Codegen.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||
<ProjectReference Include="..\mROA\mROA.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Formats.Cbor">
|
||||
<HintPath>..\..\..\..\.nuget\packages\system.formats.cbor\9.0.7\lib\net9.0\System.Formats.Cbor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.15.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user