/// <summary>
        /// Initializes a new instance of the <see cref="StorageCoordinator"/> class.
        /// </summary>
        /// <param name="container">The container.</param>
        /// <param name="phoneService">The phone service.</param>
        /// <param name="storageMechanisms">The storage mechanisms.</param>
        /// <param name="handlers">The handlers.</param>
        public StorageCoordinator(IPhoneContainer container, IPhoneService phoneService, IEnumerable<IStorageMechanism> storageMechanisms, IEnumerable<IStorageHandler> handlers) {
            this.container = container;
            this.phoneService = phoneService;
            this.storageMechanisms = storageMechanisms.ToList();

            handlers.Apply(x => AddStorageHandler(x));

            phoneService.Resurrecting += () => currentRestoreMode = StorageMode.Any;
            phoneService.Continuing += () => storageMechanisms.Apply(x => x.ClearLastSession());
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PhoneStateStorageMechanism"/> class.
 /// </summary>
 /// <param name="container">The container.</param>
 /// <param name="phoneService">The phone service.</param>
 public PhoneStateStorageMechanism(IPhoneContainer container, IPhoneService phoneService) {
     this.container = container;
     this.phoneService = phoneService;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AppSettingsStorageMechanism"/> class.
 /// </summary>
 /// <param name="container">The container.</param>
 public AppSettingsStorageMechanism(IPhoneContainer container)
 {
     this.container = container;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PhoneStateStorageMechanism"/> class.
 /// </summary>
 /// <param name="container">The container.</param>
 /// <param name="phoneService">The phone service.</param>
 public PhoneStateStorageMechanism(IPhoneContainer container, IPhoneService phoneService)
 {
     this.container    = container;
     this.phoneService = phoneService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AppSettingsStorageMechanism"/> class.
 /// </summary>
 /// <param name="container">The container.</param>
 public AppSettingsStorageMechanism(IPhoneContainer container) {
     this.container = container;
 }
 public PhoneServicesModule(Frame rootFrame, IPhoneContainer phoneContainer)
 {
     this.phoneContainer = phoneContainer;
     this.rootFrame      = rootFrame;
 }