Update API and imported CapnProto Runtime

This commit is contained in:
TheJoKlLa 2021-09-19 21:12:51 +02:00
parent bc54f708ca
commit 78360a2d4c
10 changed files with 40 additions and 11 deletions

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
path = FabAccessAPI/schema
url = https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
branch = main
[submodule "external/capnproto-dotnetcore"]
path = external/capnproto-dotnetcore
url = https://github.com/c80k/capnproto-dotnetcore.git

View File

@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FabAccessAPI_Test", "FabAcc
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NFC", "external\NFC\NFC\NFC.csproj", "{D53A98E8-48B5-4DCE-A98E-4623EE746E16}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Capnp.Net.Runtime", "external\capnproto-dotnetcore\Capnp.Net.Runtime\Capnp.Net.Runtime.csproj", "{C587AAC3-50A7-4871-A50D-7880B6F24EF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -327,6 +329,30 @@ Global
{D53A98E8-48B5-4DCE-A98E-4623EE746E16}.Release|x64.Build.0 = Release|Any CPU
{D53A98E8-48B5-4DCE-A98E-4623EE746E16}.Release|x86.ActiveCfg = Release|Any CPU
{D53A98E8-48B5-4DCE-A98E-4623EE746E16}.Release|x86.Build.0 = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|ARM.ActiveCfg = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|ARM.Build.0 = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|iPhone.Build.0 = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|x64.ActiveCfg = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|x64.Build.0 = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|x86.ActiveCfg = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Debug|x86.Build.0 = Debug|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|Any CPU.Build.0 = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|ARM.ActiveCfg = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|ARM.Build.0 = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|iPhone.ActiveCfg = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|iPhone.Build.0 = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|x64.ActiveCfg = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|x64.Build.0 = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|x86.ActiveCfg = Release|Any CPU
{C587AAC3-50A7-4871-A50D-7880B6F24EF6}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -58,7 +58,7 @@ namespace Borepin.PageModel.AddServerProcess
connection_update.Username = Username;
await _BFFHService.Authenticate(connection_update, Password);
await _BFFHService.Authenticate(connection_update, Password).ConfigureAwait(false);
await _ConnectionService.AddConnection(_BFFHService.ActiveConnection);
await _ConnectionService.LogConnect(_BFFHService.ActiveConnection);
@ -71,4 +71,3 @@ namespace Borepin.PageModel.AddServerProcess
}
}
}
}

View File

@ -84,7 +84,7 @@ namespace Borepin.PageModel
NavigationParameters parameters = new NavigationParameters
{
{ "id", viewmodel.Instance.Id }
{ "name", viewmodel.Instance.Name }
};
INavigationResult result = await _NavigationService.NavigateAsync($"MachinePage", parameters);

View File

@ -14,7 +14,7 @@ namespace Borepin.PageModel
{
#region Private Properties
private IBFFHService _BFFHService;
private UUID _ID;
private string _Name;
private Machine _Machine;
#endregion
@ -37,7 +37,7 @@ namespace Borepin.PageModel
IInfoInterface info = await machineSystem.Info();
_Machine = (await info.GetMachine(_ID)).Item1;
_Machine = (await info.GetMachine(_Name)).Item1;
MachineItem = new MachineVisualize(_Machine);
MachineItem.LoadData();
@ -95,7 +95,7 @@ namespace Borepin.PageModel
public override void OnNavigatedTo(INavigationParameters parameters)
{
_ID = parameters["id"] as UUID;
_Name = parameters["name"] as string;
IsBusy = true;
Task.Run(LoadData);

View File

@ -66,7 +66,7 @@ namespace Borepin.Service.BFFH
public async Task<bool> Authenticate(Connection connection, string password)
{
await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", password } });
await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", password } }).ConfigureAwait(false);
await _CredentialService.AddCredentialsAsync(connection, password);

View File

@ -43,7 +43,7 @@ namespace FabAccessAPI
public async Task Auth(string mech, Dictionary<string, object> kvs, CancellationToken cancellationToken_ = default)
{
// _bootstrapCap = await _bootstrapCap.Unwrap();
var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_);
var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_).ConfigureAwait(false);
_auth = new Auth(authCap);
var mechs = await _auth.GetMechanisms();
//_Log.Debug($"The Server supports the following auth mechs: {string.Join(", ", mechs)}");

View File

@ -11,13 +11,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Capnp.Net.Runtime" Version="1.3.118" />
<PackageReference Include="CapnpC.CSharp.MsBuild.Generation" Version="1.3.118" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="5.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\external\capnproto-dotnetcore\Capnp.Net.Runtime\Capnp.Net.Runtime.csproj" />
<ProjectReference Include="..\external\SASL\S22.Sasl.csproj" />
</ItemGroup>

@ -1 +1 @@
Subproject commit 6935947d9e4569ffb141bdc265e4c08d5a1017e4
Subproject commit 1441b59145bb364c2c61fe67f52c64a3522ee124

1
external/capnproto-dotnetcore vendored Submodule

@ -0,0 +1 @@
Subproject commit c2d17d689cd262bf9bf03366f1364d80c864b862