Exemplo n.º 1
0
 /// <summary>
 /// </summary>
 public UserDailyRestrain(int userId)
     : this()
 {
     _userId = userId;
     _restrainProperty = new RestrainProperty();
 }
Exemplo n.º 2
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "UserId": return _userId;
             case "RefreshDate": return _refreshDate;
             case "RestrainProperty": return _restrainProperty;
             default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "UserId":
                 _userId = value.ToInt();
                 break;
             case "RefreshDate":
                 _refreshDate = value.ToDateTime();
                 break;
             case "RestrainProperty":
                 _restrainProperty = ConvertCustomField<RestrainProperty>(value, index);
                 break;
             default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }