protected override void Configure() { _container = new MefContainer(); var batch = new CompositionBatch(); batch.AddExportedValue <IWindowManager>(new WindowManager()); batch.AddExportedValue <IEventAggregator>(new EventAggregator()); batch.AddExportedValue(_container); _container.Compose(batch); }
public FillOrderAction(IEventAggregator eventAggregator, IMetroDialog metroDialog, IMefContainer mefContainer) : base(eventAggregator) { _metroDialog = metroDialog; _mefContainer = mefContainer; }
public SellGrapeOrFieldAction(IEventAggregator eventAggregator, IMetroDialog metroDialog, IMefContainer mefContainer) : base(eventAggregator) { _metroDialog = metroDialog; _mefContainer = mefContainer; }
public static void SetContainer(IMefContainer contianer) { _container = contianer; }
public NavigationService(Lazy <IAppViewModel> appViewModel, IMefContainer container) { _appViewModel = appViewModel; _container = container; }
public PlayerSelection(IMetroDialog metroDialog, IMefContainer mefContainer) { _metroDialog = metroDialog; _mefContainer = mefContainer; }
protected PlayVisitorAction(IEventAggregator eventAggregator, IMetroDialog metroDialog, IMefContainer mefContainer) : base(eventAggregator) { _metroDialog = metroDialog; _mefContainer = mefContainer; }
public BuildStructureAction(IEventAggregator eventAggregator, IMetroDialog metroDialog, IMefContainer mefContainer) : base(eventAggregator) { _metroDialog = metroDialog; _mefContainer = mefContainer; }
public PlayWinterVisitorAction(IEventAggregator eventAggregator, IMetroDialog metroDialog, IMefContainer mefContainer) : base(eventAggregator, metroDialog, mefContainer) { }
public static T Resolve <T>(this IMefContainer container) { var service = container.Resolve(typeof(T), null); return(service is T ? (T)service : default(T)); }
/// <summary> /// Requires T2 having parameterless constructor /// </summary> public static void Register <T, T2>(this IMefContainer container) where T2 : T, new() { container.RegisterFunc(() => new T2()); container.RegisterFunc <T>(() => container.Resolve <T2>()); }
public static void RegisterInstance <T>(this IMefContainer container, T instance) { container.RegisterInstance <T>(null, instance); }
public PlantVineAction(IEventAggregator eventAggregator, IMetroDialog metroDialog, IMefContainer mefContainer) : base(eventAggregator) { _metroDialog = metroDialog; _mefContainer = mefContainer; }