public UpdateService(Updater aUpdater, IBootControl aBootControl, INodeRebooter aRebooter) { iUpdater = aUpdater; iUpdater.ProgressEventHandler += HandleProgressEvent; iRebooter = aRebooter; iBootControl = aBootControl; iStopSync = new AutoResetEvent(true); iTimer = new Timer(aObj => InternalRefresh(), null, Timeout.Infinite, PollTimeMilliseconds); }
public AppShellImpl( IAppServices aFullPrivilegeAppServices, IConfigFileCollection aConfiguration, IAddinManager aAddinManager, IAppsDirectory aAppsDirectory, IStoreDirectory aStoreDirectory, Func<DvDevice, string, string, string, IDvProviderOpenhomeOrgApp1> aAppProviderConstructor, IZipReader aZipReader, IAppMetadataStore aMetadataStore, IZipVerifier aZipVerifier, ISystemAppsConfiguration aSystemAppsConfiguration, IXappServer aXappServer, bool aAutoStart) { iFullPrivilegeAppServices = aFullPrivilegeAppServices; iZipVerifier = aZipVerifier; iXappServer = aXappServer; //iZipReader = aZipReader; iMetadataStore = aMetadataStore; iConfiguration = aConfiguration; iAddinManager = aAddinManager; iAppsDirectory = aAppsDirectory; iStoreDirectory = aStoreDirectory; iAppProviderConstructor = aAppProviderConstructor; iNodeRebooter = iFullPrivilegeAppServices.NodeRebooter; //iApps = new Dictionary<string, PublishedApp>(); iHistory = new List<HistoryItem>(); // !!!! restore previous history from disk iKnownApps = new Dictionary<string, KnownApp>(); foreach (var app in iMetadataStore.LoadAppsFromStore()) { GetOrCreateKnownApp(app.AppName); } foreach (string dirname in iAppsDirectory.GetAppSubdirectories()) { GetOrCreateKnownApp(dirname); } MarkSystemApps(aSystemAppsConfiguration); if (aAutoStart) { Start(); } }