public void OnClick() { #if BUILD_TYPE_DEBUG Debug.Log("CALL OnClick:" + Title); #endif Dictionary <EMASTERDATA, uint> dict = new Dictionary <EMASTERDATA, uint>(); dict.Add(emasterData, 0); ServerDataUtilSend.SendPacketAPI_GetMasterDataAll2(dict). setSuccessAction( _data => { RecvMasterDataAll2Value result = _data.GetResult <RecvMasterDataAll2>().result; foreach (FieldInfo fi in typeof(RecvMasterDataAll2Value).GetFields()) { object obj = fi.GetValue(result); try { List <int> l = SQLiteClient.Instance.Reflect(obj); if (l.Count >= 2 && l[1] > 0) { #if BUILD_TYPE_DEBUG Debug.Log(string.Format("REFLECT {0} u_or_i:{1}件 d:{2}件 \n", DivRNUtil.GetTableName(obj.GetType().ToString()), l[0], l[1])); #endif } } catch (Exception e) { #if BUILD_TYPE_DEBUG Debug.LogError("ERROR:" + e.Message + "::" + obj.GetType().ToString()); #endif } } }). setErrorAction( _data => { #if BUILD_TYPE_DEBUG Debug.LogError("ERROR"); #endif }). SendStart(); }
//マスタクラス名からテーブル名を導出する public static string GetTableName(this Type t) { return(DivRNUtil.GetTableName(t.Name)); }
public static string GetTableName(this EMASTERDATA emasterdata) { return(DivRNUtil.GetTableName(emasterdata.ToString().Replace("eMASTERDATA_", ""))); }