Esempio n. 1
0
        public static IDrawer CreateDrawer <TDrawerBase>(this IQFrameworkContainer container, ViewModel viewModel) where TDrawerBase : IDrawer
        {
            if (_drawers != null)
            {
            }
            if (viewModel == null)
            {
                InvertApplication.LogError("Data is null.");
                return(null);
            }
            var drawer = container.ResolveRelation <TDrawerBase>(viewModel.GetType(), viewModel);

            if (drawer == null)
            {
                InvertApplication.Log(String.Format("Couldn't Create drawer for {0}.", viewModel.GetType()));
            }
            return(drawer);
        }
Esempio n. 2
0
 public static GraphItemViewModel CreateViewModel(this IQFrameworkContainer container, object data)
 {
     return(container.ResolveRelation <ViewModel>(data.GetType(), data, null) as GraphItemViewModel);
 }