You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewException($"Unrecognised random Type [{typeAndLengthOrFormat[0]}] - Expect letters, lowercaseletters, uppercaseletters digits or alphanumerics");
223
216
}
224
217
}
225
-
intnumber;
226
-
if(!int.TryParse(typeAndLengthOrFormat[1],outnumber))thrownewException($"Invalid number of characters in Random token {{random;<type>;<length>}}");
218
+
if(!int.TryParse(typeAndLengthOrFormat[1],outintnumber))thrownewException($"Invalid number of characters in Random token {{random;<type>;<length>}}");
thrownewException($"Maximum date earlier than Maximum date! Expect {{random;date(dd-MM-yyyy,dd-MM-yyyy);<format>}} Mindate = {MinDate.ToString("dd/MM/yyyy")}, Maxdate = {MaxDate.ToString("dd/MM/yyyy")}");
// Make sure we are thread-safe. There is a possibility that the framework is in a multi-threaded apartment (MTA) and it is possible
28
-
// for TokenProcessor to become null between checking and use ( if (TokenProcessor!=null) option = (T)(object)TokenProcessor((string)(object)option); ).
29
-
// Using the processor temporary variable forces .NET to make a copy of the handler.
30
-
// See https://blogs.msdn.microsoft.com/ericlippert/2009/04/29/events-and-races/ for details.
31
-
//
32
-
Func<string,string>processor=null;
33
-
34
21
// Only do any processing if the object is a string.
35
22
if(typeof(T)==typeof(String))
36
23
{
@@ -44,18 +31,9 @@ public static T DetokeniseString<T>(T ObjectToProcess)
44
31
while(!StringToProcess.Equals(ProcessedString))
45
32
{
46
33
StringToProcess=string.Copy(ProcessedString);
47
-
processor=TokenProcessor;
48
-
if(processor!=null)
49
-
{
50
-
ProcessedString=processor(StringToProcess);
51
-
Logger.WriteLine(Logger.LogLevels.FrameworkDebug,"Processed [{0}] to [{1}]",StringToProcess,ProcessedString??string.Empty);
52
-
}
53
-
else
54
-
{
55
-
Logger.WriteLine(Logger.LogLevels.FrameworkDebug,"No Token Processor active. String not processed");
0 commit comments