assert non-disposed status for plugin in each routine, closes #1
This commit is contained in:
@@ -18,25 +18,25 @@ namespace dopt.DeltaBarth
|
||||
}
|
||||
public void Startup(string basisApiUrl, string nutzername, string passwort, string datenbank, string mandant)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
SetzeBasisApiUrl(basisApiUrl);
|
||||
SetzeNutzerdaten(nutzername, passwort, datenbank, mandant);
|
||||
}
|
||||
public void Shutdown()
|
||||
{
|
||||
base.Finalise();
|
||||
}
|
||||
public void SetzeBasisApiUrl(string basisApiUrl)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
pyModManagement.set_base_url(basisApiUrl);
|
||||
}
|
||||
public void SetzeNutzerdaten(string nutzername, string passwort, string datenbank, string mandant)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
using (Py.GIL()) {
|
||||
pyModManagement.set_credentials(nutzername, passwort, datenbank, mandant);
|
||||
}
|
||||
}
|
||||
public JsonStructs.UmsatzPrognoseAusgabe UmsatzprognoseDummy(int? firmaId, DateTime? buchungsDatum)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
string pyJson;
|
||||
using (Py.GIL())
|
||||
{
|
||||
@@ -48,6 +48,7 @@ namespace dopt.DeltaBarth
|
||||
}
|
||||
public JsonStructs.UmsatzPrognoseAusgabe Umsatzprognose(int? firmaId, DateTime? buchungsDatum)
|
||||
{
|
||||
AssertNotDisposed();
|
||||
string pyJson;
|
||||
using (Py.GIL())
|
||||
{
|
||||
@@ -59,6 +60,7 @@ namespace dopt.DeltaBarth
|
||||
}
|
||||
protected string GetBaseApiUrl()
|
||||
{
|
||||
AssertNotDisposed();
|
||||
string pyJson;
|
||||
using (Py.GIL())
|
||||
{
|
||||
@@ -68,6 +70,7 @@ namespace dopt.DeltaBarth
|
||||
}
|
||||
protected JsonStructs.Credentials GetCredentials()
|
||||
{
|
||||
AssertNotDisposed();
|
||||
string pyJson;
|
||||
using (Py.GIL())
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="dopt.SharpPython" Version="0.2.1" />
|
||||
<PackageReference Include="dopt.SharpPython" Version="0.3.0" />
|
||||
<Content Include="..\python\**\*">
|
||||
<Link>python\%(RecursiveDir)/%(FileName)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
||||
Reference in New Issue
Block a user