public void AddingSigmaTagMappings() { string tags = File.ReadAllText(@"..\..\..\..\sampleFiles\tagMappingsWithSigma.csv"); DataTable tm = Utilities.ConvertCSVTexttoDataTable(tags); var output = AzureModel.UpdateTagMappings("GP01", tm); Console.WriteLine(output); }
internal static void ProcessModifiedTagMapping(string plant, string version) { // add/modify/delete tags mappings string suffix = "." + plant + ".csv"; string tags = AzureFileHelper.ReadFile(tagMappingFile + suffix); if (tags != null) { DataTable tm = Utilities.ConvertCSVTexttoDataTable(tags); string output = AzureModel.UpdateTagMappings(plant, tm); LogHelper.LogMessage(plant, version, "Updated the following tag mappings:\r\n" + output); AzureFileHelper.WriteFile(tagMappingFileProcessed + suffix, tags, false); AzureFileHelper.DeleteFile(tagMappingFile + suffix); } }