/// <summary>
 ///     Initializes a new instance of the <see cref="WindowsPhoneBootstrapperBase" /> class.
 /// </summary>
 protected WindowsPhoneBootstrapperBase([NotNull] PhoneApplicationFrame rootFrame, PlatformInfo platform = null)
     : base(platform ?? PlatformExtensions.GetPlatformInfo())
 {
     Should.NotBeNull(rootFrame, "rootFrame");
     _rootFrame = rootFrame;
     PhoneApplicationService.Current.Launching += OnLaunching;
 }
 protected WpfBootstrapperBase([NotNull] Application application, bool autoStart = true, PlatformInfo platform = null)
 {
     Should.NotBeNull(application, nameof(application));
     _platform = platform ?? PlatformExtensions.GetPlatformInfo();
     application.Startup += ApplicationOnStartup;
     AutoStart = autoStart;
 }
 protected TouchBootstrapperBase([NotNull] UIWindow window, PlatformInfo platform = null)
 {
     Should.NotBeNull(window, "window");
     _window = window;
     _platform = platform ?? PlatformExtensions.GetPlatformInfo();
     WrapToNavigationController = true;
 }
 protected WinRTBootstrapperBase([NotNull] Frame rootFrame, bool overrideAssemblies, PlatformInfo platform = null)
 {
     Should.NotBeNull(rootFrame, "rootFrame");
     _rootFrame = rootFrame;
     _overrideAssemblies = overrideAssemblies;
     _platform = platform ?? PlatformExtensions.GetPlatformInfo();
 }
 protected SilverlightBootstrapperBase([NotNull] Application application, bool autoStart = true, PlatformInfo platform = null)
 {
     Should.NotBeNull(application, "application");
     _application = application;
     _platform = platform ?? PlatformExtensions.GetPlatformInfo();
     AutoStart = autoStart;
     application.Startup += ApplicationOnStartup;
 }
Ejemplo n.º 6
0
 protected MvvmApplication(LoadMode mode = LoadMode.Runtime)
 {
     ServiceProvider.DesignTimeManager = DesignTimeManagerImpl.Instance;
     Current = this;
     _mode = mode;
     _platform = PlatformInfo.Unknown;
     _context = new DataContext();
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="BootstrapperBase" /> class.
 /// </summary>
 protected BootstrapperBase(PlatformInfo platform)
 {
     ServiceProvider.DesignTimeManager = DesignTimeManagerImpl.Instance;
     if (Current != null)
         Tracer.Error("The application is already has a bootstrapper " + Current);
     LoadMode = LoadMode.Runtime;
     _platform = platform ?? PlatformInfo.Unknown;
 }
Ejemplo n.º 8
0
 public ModuleContext(PlatformInfo platform, LoadMode mode, IIocContainer iocContainer, IDataContext context,
     IList<Assembly> assemblies)
 {
     _platform = platform ?? PlatformInfo.Unknown;
     _mode = mode;
     _iocContainer = iocContainer;
     _context = context.ToNonReadOnly();
     _assemblies = assemblies ?? Empty.Array<Assembly>();
 }
Ejemplo n.º 9
0
 protected MvvmApplication(LoadMode mode = LoadMode.Runtime)
 {
     ServiceProvider.DesignTimeManager = DesignTimeManagerImpl.Instance;
     if (ServiceProvider.UiSynchronizationContextField == null)
         ServiceProvider.UiSynchronizationContextField = SynchronizationContext.Current;
     Current = this;
     _mode = mode;
     _platform = PlatformInfo.Unknown;
     _context = new DataContext();
 }
Ejemplo n.º 10
0
 static PlatformInfo()
 {
     Unknown = new PlatformInfo(PlatformType.Unknown, new Version(0, 0));
     UnitTest = new PlatformInfo(PlatformType.UnitTest, new Version(0, 0));
 }
 public DesignTimeManagerBase()
 {
     _locker = new object();
     _platform = PlatformExtensions.GetPlatformInfo();
     _priority = GetType() == typeof(DesignTimeManagerBase) ? int.MinValue : 0;
 }
Ejemplo n.º 12
0
 static PlatformInfo()
 {
     Unknown  = new PlatformInfo(PlatformType.Unknown, "0.0", PlatformIdiom.Unknown);
     UnitTest = new PlatformInfo(PlatformType.UnitTest, "0.0", PlatformIdiom.Unknown);
 }
Ejemplo n.º 13
0
 public void Initialize(PlatformInfo platform, IIocContainer iocContainer, IList<Assembly> assemblies, IDataContext context)
 {
     Should.NotBeNull(platform, nameof(platform));
     Should.NotBeNull(iocContainer, nameof(iocContainer));
     Should.NotBeNull(assemblies, nameof(assemblies));
     if (_isInitialized)
         return;
     _isInitialized = true;
     Current = this;
     _platform = platform;
     _iocContainer = iocContainer;
     if (context != null)
         Context.Merge(context);
     OnInitialize(assemblies);
     RaiseInitialized(this);
 }
 public DesignTimeManagerImpl(PlatformInfo platform)
 {
     _platform = platform ?? PlatformInfo.Unknown;
 }
Ejemplo n.º 15
0
 public void Initialize(PlatformInfo platform, IIocContainer iocContainer, IList<Assembly> assemblies,
     IDataContext context)
 {
     Should.NotBeNull(platform, "platform");
     Should.NotBeNull(iocContainer, "iocContainer");
     Should.NotBeNull(assemblies, "assemblies");
     if (Interlocked.Exchange(ref _state, InitializedState) == InitializedState)
         return;
     Current = this;
     _platform = platform;
     _iocContainer = iocContainer;
     if (context != null)
         Context.Merge(context);
     OnInitialize(assemblies);
     RaiseInitialized(this);
 }
Ejemplo n.º 16
0
 static PlatformInfo()
 {
     Unknown  = new PlatformInfo(PlatformType.Unknown, new Version(0, 0));
     UnitTest = new PlatformInfo(PlatformType.UnitTest, new Version(0, 0));
 }
 protected WinRTBootstrapperBase([CanBeNull] Frame rootFrame, bool overrideAssemblies, PlatformInfo platform = null)
 {
     _rootFrame = rootFrame;
     _overrideAssemblies = overrideAssemblies;
     _platform = platform ?? PlatformExtensions.GetPlatformInfo();
 }
 protected WinFormsBootstrapperBase(bool autoRunApplication = true, PlatformInfo platform = null)
 {
     _platform = platform ?? PlatformExtensions.GetPlatformInfo();
     AutoRunApplication = autoRunApplication;
     ShutdownOnMainViewModelClose = true;
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="XamarinFormsBootstrapperBase" /> class.
 /// </summary>
 protected XamarinFormsBootstrapperBase(PlatformInfo platform = null)
     : base(platform ?? GetPlatformInfo())
 {
 }
 protected XamarinFormsBootstrapperBase(PlatformInfo platform = null)
 {
     _platform = platform ?? GetPlatformInfo();
 }