add filepath handling and integrated setup method, closes #3
This commit is contained in:
@@ -16,17 +16,12 @@ namespace dopt.DeltaBarth
|
||||
pyModPipeline = Py.Import("delta_barth.pipelines");
|
||||
}
|
||||
}
|
||||
public void Startup(string basisApiUrl, string nutzername, string passwort, string datenbank, string mandant)
|
||||
public void Startup(string datenPfad, string basisApiUrl, string nutzername, string passwort, string datenbank, string mandant)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
SetzeBasisApiUrl(basisApiUrl);
|
||||
Setup(datenPfad, basisApiUrl);
|
||||
SetzeNutzerdaten(nutzername, passwort, datenbank, mandant);
|
||||
}
|
||||
protected void SetzeBasisApiUrl(string basisApiUrl)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
pyModManagement.set_base_url(basisApiUrl);
|
||||
}
|
||||
public void SetzeNutzerdaten(string nutzername, string passwort, string datenbank, string mandant)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
@@ -58,6 +53,14 @@ namespace dopt.DeltaBarth
|
||||
|
||||
return parsed;
|
||||
}
|
||||
protected void Setup(string datenPfad, string basisApiUrl)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
using (Py.GIL())
|
||||
{
|
||||
pyModManagement.setup(datenPfad, basisApiUrl);
|
||||
}
|
||||
}
|
||||
protected string GetBaseApiUrl()
|
||||
{
|
||||
AssertNotDisposed();
|
||||
@@ -68,6 +71,16 @@ namespace dopt.DeltaBarth
|
||||
}
|
||||
return pyJson;
|
||||
}
|
||||
protected string GetDataPath()
|
||||
{
|
||||
AssertNotDisposed();
|
||||
string pyJson;
|
||||
using (Py.GIL())
|
||||
{
|
||||
pyJson = (string)pyModManagement.get_data_path();
|
||||
}
|
||||
return pyJson;
|
||||
}
|
||||
protected DataObjects.Credentials GetCredentials()
|
||||
{
|
||||
AssertNotDisposed();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Platforms>x64</Platforms>
|
||||
<Version>0.2.0</Version>
|
||||
<Version>0.3.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user