Example #1
0
        ISyncMasterEntity Convert(ISyncSlaveEntity entity)
        {
            var rs = Master.Create();

            foreach (var item in Names)
            {
                rs[item] = entity[item];
            }
            return(rs);
        }
Example #2
0
        ISyncSlaveEntity[] Convert(ISyncMasterEntity[] arr)
        {
            var rs = new ISyncSlaveEntity[arr.Length];

            for (Int32 i = 0; i < arr.Length; i++)
            {
                rs[i] = Convert(arr[i]);
            }
            return(rs);
        }
Example #3
0
        ISyncSlaveEntity[] GetAll(Expression where, Int32 start, Int32 max)
        {
            var list = Factory.FindAll(where, null, null, start, max);

            if (list == null || list.Count < 1)
            {
                return(null);
            }

            var rs = new ISyncSlaveEntity[list.Count];

            for (var i = 0; i < list.Count; i++)
            {
                rs[i] = list[i] as ISyncSlaveEntity;
            }
            return(rs);
        }
Example #4
0
        ISyncSlaveEntity[] GetAll(String where, Int32 start, Int32 max)
        {
            var list = Factory.FindAll(where, null, null, start, max);
            if (list == null || list.Count < 1) return null;

            var rs = new ISyncSlaveEntity[list.Count];
            for (int i = 0; i < list.Count; i++)
            {
                rs[i] = list[i] as ISyncSlaveEntity;
            }
            return rs;
        }
Example #5
0
 ISyncMasterEntity Convert(ISyncSlaveEntity entity)
 {
     var rs = Master.Create();
     foreach (var item in Names)
     {
         rs[item] = entity[item];
     }
     return rs;
 }
Example #6
0
 ISyncSlaveEntity[] Convert(ISyncMasterEntity[] arr)
 {
     var rs = new ISyncSlaveEntity[arr.Length];
     for (int i = 0; i < arr.Length; i++)
     {
         rs[i] = Convert(arr[i]);
     }
     return rs;
 }