public static ProjectsViewModel GetDefault() { lock (typeof(ProjectsViewModel)) { if (defaultInstance == null) { defaultInstance = new ProjectsViewModel(); } } return(defaultInstance); }
public static ProjectsViewModel GetForCustomerId(long customerId) { lock (typeof(ProjectsViewModel)) { if (instances.ContainsKey(customerId) != true) { instances[customerId] = new ProjectsViewModel(customerId); } } return(instances[customerId]); }