public virtual Lock ParseThreadLock(TInstance instance) { return(new Lock(string.Intern( $"[({Thread.CurrentThread.ManagedThreadId}){LockName.Flow(StringFlow.UrlEncode)}<{typeof(TInstance).FullName}>]:" + $"{FlagLambdas.Select(x => x(instance).ToString().Flow(StringFlow.UrlEncode)).Join(" ")}"))); }
public LockStep() { LockName = "TAP_Mutex1"; SystemWide = true; Rules.Add(() => LockName.Contains("\\") == false, "Lock Name does not support '\\'", "LockName"); }
public virtual Lock Parse(TInstance instance) { return(new Lock(string.Intern( $"[{LockName.Flow(StringFlow.UrlEncode)}<{typeof(TInstance).FullName}>]:" + $"{FlagLambdas.Select(x => x(instance).ToString().Flow(StringFlow.UrlEncode)).Join(" ")}"))); }