Exemplo n.º 1
0
        public static object NewImmutableRow(RowData instanceData) // where T : class, IModel
        {
            object row = null;

            if (instanceData.Table.Model.CsType.IsInterface)
            {
                row = generator.CreateInterfaceProxyWithoutTarget(instanceData.Table.Model.CsType, new ImmutableRowInterceptor(instanceData));
            }
            else
            {
                row = generator.CreateClassProxy(instanceData.Table.Model.CsType, new ImmutableRowInterceptor(instanceData));
            }

            if (instanceData.Table.Model.ProxyType == null)
            {
                instanceData.Table.Model.ProxyType = row.GetType();
            }

            return(row);
            //return generator.CreateInterfaceProxyWithoutTarget(instanceData.Table.Model.CsType, new ImmutableRowInterceptor(instanceData));
            //return generator.CreateInterfaceProxyWithoutTarget<T>(new ImmutableRowInterceptor(instanceData));
        }
Exemplo n.º 2
0
 public PrimaryKeys(RowData row)
 {
     Data = ReadRow(row).ToArray();
 }
Exemplo n.º 3
0
 public ImmutableRowInterceptor(RowData rowData)
 {
     RowData = rowData;
 }