diff --git a/InRule.Runtime.Metrics.AzureTableStorage/InRule.Runtime.Metrics.AzureTableStorage.csproj b/InRule.Runtime.Metrics.AzureTableStorage/InRule.Runtime.Metrics.AzureTableStorage.csproj index 5d95648..3999817 100644 --- a/InRule.Runtime.Metrics.AzureTableStorage/InRule.Runtime.Metrics.AzureTableStorage.csproj +++ b/InRule.Runtime.Metrics.AzureTableStorage/InRule.Runtime.Metrics.AzureTableStorage.csproj @@ -16,7 +16,7 @@ - + diff --git a/InRule.Runtime.Metrics.SqlServer.IntegrationTests/InRule.Runtime.Metrics.SqlServer.IntegrationTests.csproj b/InRule.Runtime.Metrics.SqlServer.IntegrationTests/InRule.Runtime.Metrics.SqlServer.IntegrationTests.csproj index 3baae79..bd095c3 100644 --- a/InRule.Runtime.Metrics.SqlServer.IntegrationTests/InRule.Runtime.Metrics.SqlServer.IntegrationTests.csproj +++ b/InRule.Runtime.Metrics.SqlServer.IntegrationTests/InRule.Runtime.Metrics.SqlServer.IntegrationTests.csproj @@ -7,7 +7,7 @@ - + diff --git a/InRule.Runtime.Metrics.SqlServer/InRule.Runtime.Metrics.SqlServer.csproj b/InRule.Runtime.Metrics.SqlServer/InRule.Runtime.Metrics.SqlServer.csproj index cf2abce..ea52c33 100644 --- a/InRule.Runtime.Metrics.SqlServer/InRule.Runtime.Metrics.SqlServer.csproj +++ b/InRule.Runtime.Metrics.SqlServer/InRule.Runtime.Metrics.SqlServer.csproj @@ -24,7 +24,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Samples/InRule.Runtime.Metrics.Csv/CsvMetricLogger.cs b/Samples/InRule.Runtime.Metrics.Csv/CsvMetricLogger.cs index fa9fe71..2490816 100644 --- a/Samples/InRule.Runtime.Metrics.Csv/CsvMetricLogger.cs +++ b/Samples/InRule.Runtime.Metrics.Csv/CsvMetricLogger.cs @@ -7,10 +7,10 @@ namespace InRule.Runtime.Metrics.Csv { - public sealed class CsvMetricLogger : IMetricLogger - { - public async Task LogMetricsAsync(string serviceId, string ruleApplicationName, Guid sessionId, Metric[] metrics) - { + public sealed class CsvMetricLogger : IMetricLogger + { + public async Task LogMetricsAsync(string serviceId, string ruleApplicationName, Guid sessionId, Metric[] metrics) + { // loop through all of the metrics that are emitted by the rules engine // there will be one metric per entity foreach (var metricGroup in metrics.GroupBy(metric => metric.EntityName)) @@ -33,7 +33,7 @@ public async Task LogMetricsAsync(string serviceId, string ruleApplicationName, } } } - } + } public void LogMetrics(string serviceId, string ruleApplicationName, Guid sessionId, Metric[] metrics) { @@ -42,7 +42,7 @@ public void LogMetrics(string serviceId, string ruleApplicationName, Guid sessio foreach (var metricGroup in metrics.GroupBy(metric => metric.EntityName)) { // save them to disk in a csv file per Entity - string filePath = $"{ConfigurationManager.AppSettings["OutputDirectory"]}{metricGroup.Key.Replace('/', '+')}.csv"; + string filePath = $"{ConfigurationManager.AppSettings["OutputDirectory"]}\\{metricGroup.Key.Replace('/', '+')}.csv"; using (FileStream stream = new FileStream(filePath, FileMode.Append, FileAccess.Write, FileShare.None)) using (StreamWriter writer = new StreamWriter(stream, Encoding.UTF8)) @@ -55,7 +55,7 @@ public void LogMetrics(string serviceId, string ruleApplicationName, Guid sessio writer.WriteLine(String.Join(",", metric.Schema.Properties.Select(property => property.Name))); } - writer.WriteLine(String.Join(",", metric.Schema.Properties.Select(property => metric[property].ToString()))); + writer.WriteLine(String.Join(",", metric.Schema.Properties.Select(property => metric[property]?.ToString()))); } } } diff --git a/Samples/InRule.Runtime.Metrics.Csv/InRule.Runtime.Metrics.Csv.csproj b/Samples/InRule.Runtime.Metrics.Csv/InRule.Runtime.Metrics.Csv.csproj index 9c0d15e..90eaafe 100644 --- a/Samples/InRule.Runtime.Metrics.Csv/InRule.Runtime.Metrics.Csv.csproj +++ b/Samples/InRule.Runtime.Metrics.Csv/InRule.Runtime.Metrics.Csv.csproj @@ -31,17 +31,17 @@ 4 - - ..\packages\InRule.Common.5.5.0\lib\net461\InRule.Common.dll + + ..\packages\InRule.Common.5.5.1\lib\net461\InRule.Common.dll - - ..\packages\InRule.Repository.5.5.0\lib\net461\InRule.Repository.dll + + ..\packages\InRule.Repository.5.5.1\lib\net461\InRule.Repository.dll - - ..\packages\InRule.Repository.5.5.0\lib\net461\InRule.Repository.XmlSerializers.dll + + ..\packages\InRule.Repository.5.5.1\lib\net461\InRule.Repository.XmlSerializers.dll - - ..\packages\InRule.Runtime.5.5.0\lib\net461\InRule.Runtime.dll + + ..\packages\InRule.Runtime.5.5.1\lib\net461\InRule.Runtime.dll ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll diff --git a/Samples/InRule.Runtime.Metrics.Csv/packages.config b/Samples/InRule.Runtime.Metrics.Csv/packages.config index bf519dd..b806636 100644 --- a/Samples/InRule.Runtime.Metrics.Csv/packages.config +++ b/Samples/InRule.Runtime.Metrics.Csv/packages.config @@ -1,8 +1,8 @@  - - - + + + \ No newline at end of file diff --git a/Samples/InRule.Runtime.Metrics.TestHarness/InRule.Runtime.Metrics.TestHarness.csproj b/Samples/InRule.Runtime.Metrics.TestHarness/InRule.Runtime.Metrics.TestHarness.csproj index cf3f7d0..981148b 100644 --- a/Samples/InRule.Runtime.Metrics.TestHarness/InRule.Runtime.Metrics.TestHarness.csproj +++ b/Samples/InRule.Runtime.Metrics.TestHarness/InRule.Runtime.Metrics.TestHarness.csproj @@ -36,17 +36,17 @@ 4 - - ..\packages\InRule.Common.5.5.0\lib\net461\InRule.Common.dll + + ..\packages\InRule.Common.5.5.1\lib\net461\InRule.Common.dll - - ..\packages\InRule.Repository.5.5.0\lib\net461\InRule.Repository.dll + + ..\packages\InRule.Repository.5.5.1\lib\net461\InRule.Repository.dll - - ..\packages\InRule.Repository.5.5.0\lib\net461\InRule.Repository.XmlSerializers.dll + + ..\packages\InRule.Repository.5.5.1\lib\net461\InRule.Repository.XmlSerializers.dll - - ..\packages\InRule.Runtime.5.5.0\lib\net461\InRule.Runtime.dll + + ..\packages\InRule.Runtime.5.5.1\lib\net461\InRule.Runtime.dll ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll diff --git a/Samples/InRule.Runtime.Metrics.TestHarness/packages.config b/Samples/InRule.Runtime.Metrics.TestHarness/packages.config index bf519dd..b806636 100644 --- a/Samples/InRule.Runtime.Metrics.TestHarness/packages.config +++ b/Samples/InRule.Runtime.Metrics.TestHarness/packages.config @@ -1,8 +1,8 @@  - - - + + + \ No newline at end of file