public virtual TViewModel MapFromClientParameters <TViewModel>(MasterfileParameter parameters) where TViewModel : DashboardSharedViewModel { if (string.IsNullOrEmpty(parameters.SharedParameter)) { return(null); } var jSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, DateTimeZoneHandling = DateTimeZoneHandling.Utc }; jSettings.Converters.Add(new DefaultWrongFormatDeserialize()); var sharedModel = JsonConvert.DeserializeObject <TViewModel>(parameters.SharedParameter, jSettings ); if (sharedModel != null) { sharedModel.CustomMappingRule(); } return(sharedModel); }
public virtual void ProcessFromClientParameters(MasterfileParameter parameters) { MapFromClientParameters(parameters); }
//TODO: temporary this is virtual to prevent exception in build, wating for all childs refactoring, //this method should be abstract to force implementation in child public virtual void MapFromClientParameters(MasterfileParameter parameters) { throw new NotImplementedException(); }