-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from DougSchmidt-AI/feature/PF-1365-NtdnrRepo…
…rtingTool Feature/pf 1365 ntdnr reporting tool
- Loading branch information
Showing
17 changed files
with
1,451 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-2.0.14.0" newVersion="2.0.14.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace ObservationReportExporter | ||
{ | ||
public class Context | ||
{ | ||
public string SamplesServer { get; set; } | ||
public string SamplesApiToken { get; set; } | ||
public string TimeSeriesServer { get; set; } | ||
public string TimeSeriesUsername { get; set; } | ||
public string TimeSeriesPassword { get; set; } | ||
public string ExportTemplateName { get; set; } | ||
public string AttachmentFilename { get; set; } = "Report.xlsx"; | ||
public bool DryRun { get; set; } | ||
public bool DeleteExistingAttachments { get; set; } = true; | ||
|
||
public Dictionary<string, string> AttachmentTags { get; } = | ||
new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase); | ||
public List<string> LocationIds { get; } = new List<string>(); | ||
public List<string> LocationGroupIds { get; } = new List<string>(); | ||
public List<string> AnalyticalGroupIds { get; } = new List<string>(); | ||
public List<string> ObservedPropertyIds { get; } = new List<string>(); | ||
public DateTimeOffset? StartTime { get; set; } | ||
public DateTimeOffset? EndTime { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Reflection; | ||
|
||
namespace ObservationReportExporter | ||
{ | ||
public class ExeHelper | ||
{ | ||
// ReSharper disable once PossibleNullReferenceException | ||
public static string ExeFullPath => Path.GetFullPath(Assembly.GetEntryAssembly().Location); | ||
public static string ExeDirectory => Path.GetDirectoryName(ExeFullPath); | ||
public static string ExeVersion => FileVersionInfo.GetVersionInfo(ExeFullPath).FileVersion; | ||
public static string ExeName => Path.GetFileNameWithoutExtension(ExeFullPath); | ||
public static string ExeNameAndVersion => $"{ExeName} (v{ExeVersion})"; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Samples/DotNetSdk/ObservationReportExporter/ExpectedException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace ObservationReportExporter | ||
{ | ||
public class ExpectedException : Exception | ||
{ | ||
public ExpectedException(string message) | ||
: base(message) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.