x) Renames
x) Better relativation
This commit is contained in:
Marc Hernandez 2024-05-05 23:25:54 -07:00
parent 08cf4d3aca
commit 492ca38839
4 changed files with 19 additions and 14 deletions

View File

@ -178,10 +178,10 @@ public record class Recorded<T> : Versioned<T>, imm.Imm
[lib.Dont]
public T? ZZOld { get; internal set; }
public T? Old => ZZOld;
public string Expression { get; internal set; } = "";
public string MemberName { get; internal set; } = "";
public string FilePath { get; internal set; } = "";
public int LineNumber { get; internal set; } = -1;
public string DbgName { get; internal set; } = "";
public string DbgPath { get; internal set; } = "";
public int DbgLine { get; internal set; } = -1;
public string DbgExp { get; internal set; } = "";
public MetaData() { }
}
@ -245,9 +245,9 @@ public record class Recorded<T> : Versioned<T>, imm.Imm
Reason = !string.IsNullOrWhiteSpace( reason ) ? reason : next.Meta.Reason,
ZZOld = orig,
MemberName = dbgName,
FilePath = dbgPath,
LineNumber = dbgLine,
DbgName = dbgName,
DbgPath = dbgPath,
DbgLine = dbgLine,
}
};
@ -355,9 +355,9 @@ public record class Timed<T> : Recorded<T>, imm.Imm
Reason = !string.IsNullOrWhiteSpace( reason ) ? reason : next.Meta.Reason,
//Recorded
MemberName = dbgName,
FilePath = dbgPath,
LineNumber = dbgLine,
DbgName = dbgName,
DbgPath = dbgPath,
DbgLine = dbgLine,
ZZOld = orig,
//Timed

View File

@ -171,12 +171,14 @@ static public class log
}
*/
static string s_cwd = Directory.GetCurrentDirectory();
static int s_cwdLength = s_cwd.Length;
static public string relativePath( string fullPath )
{
var cwd = Directory.GetCurrentDirectory();
if( fullPath.Length < s_cwdLength ) return fullPath;
var rel = fullPath.Substring( cwd.Length + 1 );
var rel = fullPath.Substring( s_cwdLength + 1 );
return rel;
}
@ -298,6 +300,9 @@ static public class log
static void startup( string filename, Endpoints endpoints )
{
s_cwd = Directory.GetCurrentDirectory();
s_cwdLength = s_cwd.Length;
s_endpoints = endpoints;
var start = new ThreadStart( run );

View File

@ -24,7 +24,7 @@ public interface Res_old
[DebuggerDisplay("Path = {path}")]
public class Ref : lib.I_Serialize
{
static public bool s_verboseLogging = true;
static public bool s_verboseLogging = false;
public string Filename =>path;

View File

@ -123,7 +123,7 @@ namespace lib
public class XmlFormatter2Cfg : Config
{
public bool VerboseLogging = true;
public bool VerboseLogging = false;
public Datastructure datastructure = Datastructure.Tree;