diff --git a/db/Act.cs b/db/Act.cs index 98527bc..e6824e1 100644 --- a/db/Act.cs +++ b/db/Act.cs @@ -17,49 +17,49 @@ namespace db public int Line { get; private set; } = -1; public string Member { get; private set; } = ""; - private Act( Func act, string debugInfo = "{unknown_base}", string path = "", int line = -1, string member = "" ) + private Act( Func act, string reason = "{unknown_base}", string dbgPath = "", int dbgLine = -1, string dbgMethod = "" ) { m_act = act; - DebugInfo = debugInfo; - Path = path; - Line = line; - Member = member; + DebugInfo = reason; + Path = dbgPath; + Line = dbgLine; + Member = dbgMethod; //ExtractValue( act ); } - static public Act create( Func act, string debugInfo = "{unknown}", [CallerFilePath] string path = "", [CallerLineNumber] int line = -1, [CallerMemberName] string member = "" ) + static public Act create( Func act, string reason = "{unknown}", [CallerFilePath] string dbgPath = "", [CallerLineNumber] int dbgLine = -1, [CallerMemberName] string dbgMethod = "" ) { //ExtractValue( act ); - return new Act( act, debugInfo, path, line, member ); + return new Act( act, reason, dbgPath, dbgLine, dbgMethod ); } - public static Act create( Func act, T p0, string debugInfo = "{unknown}", [CallerFilePath] string path = "", [CallerLineNumber] int line = -1, [CallerMemberName] string member = "" ) + public static Act create( Func act, T p0, string reason = "{unknown}", [CallerFilePath] string dbgPath = "", [CallerLineNumber] int dbgLine = -1, [CallerMemberName] string dbgMethod = "" ) { //ExtractValue( act ); //return new Act( act ); - return new Act( () => { return act( p0 ); }, debugInfo, path, line, member ); + return new Act( () => { return act( p0 ); }, reason, dbgPath, dbgLine, dbgMethod ); } // If we're not doing any commit ops we can just use these. - static public Act create( Action act, string debugInfo = "{unknown}", [CallerFilePath] string path = "", [CallerLineNumber] int line = -1, [CallerMemberName] string member = "" ) + static public Act create( Action act, string reason = "{unknown}", [CallerFilePath] string dbgPath = "", [CallerLineNumber] int dbgLine = -1, [CallerMemberName] string dbgMethod = "" ) { //ExtractValue( act ); - return new Act( () => { act(); return CommitResults.Perfect; }, debugInfo, path, line, member ); + return new Act( () => { act(); return CommitResults.Perfect; }, reason, dbgPath, dbgLine, dbgMethod ); } - public static Act create( Action act, T p0, string debugInfo = "{unknown}", [CallerFilePath] string path = "", [CallerLineNumber] int line = -1, [CallerMemberName] string member = "" ) + public static Act create( Action act, T p0, string reason = "{unknown}", [CallerFilePath] string dbgPath = "", [CallerLineNumber] int dbgLine = -1, [CallerMemberName] string dbgMethod = "" ) { //ExtractValue( act ); //return new Act( act ); - return new Act( () => { act( p0 ); return CommitResults.Perfect; }, debugInfo, path, line, member ); + return new Act( () => { act( p0 ); return CommitResults.Perfect; }, reason, dbgPath, dbgLine, dbgMethod ); } diff --git a/db/DB.cs b/db/DB.cs index 632ced9..6a9d48b 100644 --- a/db/DB.cs +++ b/db/DB.cs @@ -40,7 +40,7 @@ public class DB where T : IID LogGC.RegisterObjectId( m_lock ); } - // @@@@ TODO This returns an entity that can be changing. It should be a lazy instantiated copy + public Option lookup( TID id ) { if( m_objs.TryGetValue( id, out T obj ) )