コード例 #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));
        }
コード例 #2
0
ファイル: PrimaryKeys.cs プロジェクト: radtek/slim
 public PrimaryKeys(RowData row)
 {
     Data = ReadRow(row).ToArray();
 }
コード例 #3
0
 public ImmutableRowInterceptor(RowData rowData)
 {
     RowData = rowData;
 }