4using System.Threading.Tasks;
15 private DateTime lastUpdate = DateTime.Now;
16 private readonly DateTime created;
17 private FileStream fs;
18 private readonly
string fileName;
19 private readonly
bool onlySelectedCollections;
20 private readonly Array selectedCollections;
35 this.onlySelectedCollections = OnlySelectedCollections;
36 this.selectedCollections = SelectedCollections;
46 if (this.onlySelectedCollections)
48 int i, c = this.selectedCollections.Length;
49 string[] Result =
new string[c];
51 for (i = 0; i < c; i++)
52 Result[i] = this.selectedCollections.GetValue(i).ToString();
76 if (!(this.fs is
null))
93 return !this.onlySelectedCollections || Array.IndexOf(this.selectedCollections, CollectionName) >= 0;
106 public abstract Task<bool>
End();
222 public abstract Task<string>
StartObject(
string ObjectId,
string TypeName);
236 public abstract Task<bool>
ReportProperty(
string PropertyName,
object PropertyValue);
279 DateTime TP = DateTime.Now;
281 if (ForceUpdate || (TP - this.lastUpdate).TotalSeconds >= 1)
283 this.lastUpdate = TP;
287 return Task.FromResult(
true);
298 StringBuilder sb =
new StringBuilder();
300 sb.Append(
"{\"fileName\":\"");
302 sb.Append(
"\", \"size\": \"");
305 sb.Append(
"\", \"created\": \"");
307 sb.Append(
"\", \"button\": \"");
309 sb.Append(
"\", \"isKey\": ");
310 sb.Append(
FileName.EndsWith(
".key", StringComparison.CurrentCultureIgnoreCase) ?
"true" :
"false");
324 StringBuilder sb =
new StringBuilder();
326 sb.Append(
"{\"fileName\":\"");
Helps with parsing of commong data types.
static string JsonStringEncode(string s)
Encodes a string for inclusion in JSON.
The ClientEvents class allows applications to push information asynchronously to web clients connecte...
static string[] GetTabIDsForLocation(string Location)
Gets the Tab IDs of all tabs that display a particular resource.
static Task< int > PushEvent(string[] TabIDs, string Type, object Data)
Puses an event to a set of Tabs, given their Tab IDs.
Static class managing data export.
static string FormatBytes(double Bytes)
Formats a file size using appropriate unit.
Interface for database providers that can be plugged into the static Database class.
Interface for ledger providers that can be plugged into the static Ledger class.
EntryType
Ledger entry type.