chore: sync LIAM solution snapshot incl. diagnostics tooling
- update multiple LIAM projects and solution/config files - add LiamWorkflowDiagnostics app sources and generated outputs - include current workspace state (dependencies and build outputs)
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace C4IT_IAM_Engine
|
||||
{
|
||||
public static class Helper
|
||||
{
|
||||
public static string ReplaceLoopTag(this string str, int loop)
|
||||
{
|
||||
return Regex.Replace(str, @"(?<loopTag>{{(?<prefix>[^}]*)(?<loop>LOOP)(?<postfix>[^{]*)}})", loop <= 0 ? "" : "${prefix}" + loop + "${postfix}");
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace C4IT_IAM_Engine
|
||||
{
|
||||
public static class Helper
|
||||
{
|
||||
public static string ReplaceLoopTag(this string str, int loop)
|
||||
{
|
||||
return Regex.Replace(str, @"(?<loopTag>{{(?<prefix>[^}]*)(?<loop>LOOP)(?<postfix>[^{]*)}})", loop <= 0 ? "" : "${prefix}" + loop + "${postfix}");
|
||||
}
|
||||
public static string ReplaceTags(this string str, IDictionary<string, string> dict)
|
||||
{
|
||||
if (str.Equals(string.Empty) || str == null || dict == null || dict.Count == 0)
|
||||
@@ -61,21 +61,21 @@ namespace C4IT_IAM_Engine
|
||||
try
|
||||
{
|
||||
var PF = Environment.ExpandEnvironmentVariables(FilePath);
|
||||
Directory.CreateDirectory(PF);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
public static string MaskAllButLastAndFirst(this string input, char maskingChar = '*')
|
||||
{
|
||||
if (input.Length > 3)
|
||||
{
|
||||
var pattern = @"^(.{1})(.+)(.{1})$";
|
||||
var match = Regex.Match(input, pattern);
|
||||
var mask = new string(maskingChar, match.Groups[2].Length);
|
||||
return $"{match.Groups[1]}{mask}{match.Groups[3]}";
|
||||
}
|
||||
else
|
||||
return new string(maskingChar, input.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
Directory.CreateDirectory(PF);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
public static string MaskAllButLastAndFirst(this string input, char maskingChar = '*')
|
||||
{
|
||||
if (input.Length > 3)
|
||||
{
|
||||
var pattern = @"^(.{1})(.+)(.{1})$";
|
||||
var match = Regex.Match(input, pattern);
|
||||
var mask = new string(maskingChar, match.Groups[2].Length);
|
||||
return $"{match.Groups[1]}{mask}{match.Groups[3]}";
|
||||
}
|
||||
else
|
||||
return new string(maskingChar, input.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user