Ejemplo n.º 1
0
        public static ProjectsViewModel GetDefault()
        {
            lock (typeof(ProjectsViewModel))
            {
                if (defaultInstance == null)
                {
                    defaultInstance = new ProjectsViewModel();
                }
            }

            return(defaultInstance);
        }
Ejemplo n.º 2
0
        public static ProjectsViewModel GetForCustomerId(long customerId)
        {
            lock (typeof(ProjectsViewModel))
            {
                if (instances.ContainsKey(customerId) != true)
                {
                    instances[customerId] = new ProjectsViewModel(customerId);
                }
            }

            return(instances[customerId]);
        }