public static void RegisterViewModel <TViewModel>(this IUFrameContainer container, TViewModel viewModel, string identifier) where TViewModel : ViewModel { container.Register <TViewModel, TViewModel>(); container.RegisterInstance <ViewModel>(viewModel, identifier); container.RegisterInstance(typeof(TViewModel), viewModel, identifier); }
public static NodeConfig <TGraphNode> AddGraph <TGraphType, TGraphNode>(this IUFrameContainer container, string name) where TGraphType : IGraphData where TGraphNode : GenericNode, new() { container.Register <IGraphData, TGraphType>(name); return(AddNode <TGraphNode>(container, name)); }