예제 #1
0
파일: IdTable`4.cs 프로젝트: lyu0912/ing
 public IdTable(TOwner owner)
 {
     {
         var argId    = Expression.Parameter(typeof(TId));
         var argOwner = Expression.Parameter(typeof(TOwner));
         var ctor     = typeof(T).GetConstructor(new[] { typeof(TId), typeof(TOwner) });
         var call     = Expression.New(ctor, argId, argOwner);
         dummyCreation = Expression.Lambda <Func <TId, TOwner, T> >(call, argId, argOwner).Compile();
     }
     {
         var argRaw   = Expression.Parameter(typeof(TRaw));
         var argOwner = Expression.Parameter(typeof(TOwner));
         var argTime  = Expression.Parameter(typeof(DateTimeOffset));
         var ctor     = typeof(T).GetConstructor(new[] { typeof(TRaw), typeof(TOwner), typeof(DateTimeOffset) });
         var call     = Expression.New(ctor, argRaw, argOwner, argTime);
         creation = Expression.Lambda <Func <TRaw, TOwner, DateTimeOffset, T> >(call, argRaw, argOwner, argTime).Compile();
     }
     this.owner  = owner;
     DefaultView = new BindableSnapshotCollection <T>(this, this.OrderBy(x => x.Id));
 }
예제 #2
0
파일: IdTable`4.cs 프로젝트: Blealtan/ing
 public IdTable(TOwner owner)
 {
     this.owner  = owner;
     DefaultView = new BindableSnapshotCollection <T>(this, this.OrderBy(x => x.Id));
 }