protected DeferredFunc <TManager> PerformReadUsingManager <TManager>(string message) where TManager : class, IDataManager <TSession, TMetaData>, new() { // Cache Manager Type, Return type will be deferred until called Func <Func <TManager, object>, object> inputCache = (returnDelegate) => { object result = null; var msg = "PerformReadUsingManager {0}: {1}".FormatString(typeof(TManager).Name, message); this.InvokeOnScope(msg, (scope) => { var manager = Source.GetDataManager <TManager>(scope); result = returnDelegate(manager); }); return(result); }; return(new DeferredFunc <TManager>(inputCache)); }
protected TDataManager GetDataManager <TDataManager>() where TDataManager : class, IDataManager <TSessionInfo>, new() { return(_Source.GetDataManager <TDataManager>(this._Scope)); }