示例#1
0
 protected override void EvaluateInternal(Action <ObjectHandle> evaluator)
 {
     using (var osw = new ObjectSafeWrapper(id, repo.Handle))
     {
         evaluator(osw.ObjectPtr);
     }
 }
示例#2
0
 public static ILazy <TResult> Singleton <TResult>(Repository repo, ObjectId id, Func <ObjectHandle, TResult> resultSelector)
 {
     return(Singleton(() =>
     {
         using (var osw = new ObjectSafeWrapper(id, repo.Handle))
         {
             return resultSelector(osw.ObjectPtr);
         }
     }));
 }