Brook.Locator.GetDesignTimeViewModel C# (CSharp) Метод

GetDesignTimeViewModel() защищенный Метод

protected GetDesignTimeViewModel ( string name ) : object
name string
Результат object
        protected virtual object GetDesignTimeViewModel(string name)
        {
            if (_viewModelTypeMapping == null)
            {
                _viewModelTypeMapping = GetViewModelTypeMapping();
                var resolver = new ModelResolver(this.GetViewModel, null);
                ModelResolver.SetResolver(resolver);
            }

            Type viewModelType = null;
            bool found = _viewModelTypeMapping.TryGetValue(name, out viewModelType);
            if (found)
                return Activator.CreateInstance(viewModelType);
            else
                return null;
        }