Disposer
class · namespace z3n7 · source Accounts/Disposer.cs
public class Disposer
End of an account session: report, save the browser profile, clean up.
Constructors
Disposer
public Disposer(IZennoPosterProjectModel project, Instance instance, Logger log = null)
Creates the helper.
| Parameter | Description |
|---|---|
log |
Logger for progress; null logs nothing. |
Methods
ErrorReport
public string ErrorReport(bool toLog = true, bool toTelegram = false, bool toDb = false, bool screenshot = false)
Same as Reporter.ReportError.
| Parameter | Description |
|---|---|
toLog |
Write it to the log. |
toTelegram |
Send it to Telegram. |
toDb |
Write it to the account's row. |
screenshot |
Save a screenshot. |
FinishSession
public void FinishSession()
Finishes the session. When acc0 is set, writes a success report (or, when lastQuery contains dropped, an error report with a screenshot) to the log and the account's row; then saves the profile (InstanceManager.SaveProfile), writes the final line to the log and cleans up (InstanceManager.Cleanup).
SuccessReport
public string SuccessReport(bool toLog = true, bool toTelegram = false, bool toDb = false, string customMessage = null)
Same as Reporter.ReportSuccess.
| Parameter | Description |
|---|---|
toLog |
Write it to the log. |
toTelegram |
Send it to Telegram. |
toDb |
Write it to the account's row. |
customMessage |
Extra line. |