public static T Inherit <T>(ModelHostBase modelHost, Action <T> action) where T : ModelHostBase, new() { var source = modelHost.Clone() as ModelHostBase; var result = new T(); CopyProperties(source, result); if (action != null) { action(result); } return(result); }
public static T Inherit <T>(ModelHostBase modelHost) where T : ModelHostBase, new() { return(Inherit <T>(modelHost, null)); }
public static ModelHostBase Inherit(ModelHostBase modelHost) { return(Inherit <ModelHostBase>(modelHost)); }