public SyncIntegrationManager([NotNull] string appListPath, SyncServer server, [NotNull] Converter<FeedUri, Feed> feedRetriever, [NotNull] ITaskHandler handler, bool machineWide = false)
: base(appListPath, handler, machineWide)
{
#region Sanity checks
if (server.Uri == null) throw new ArgumentNullException(nameof(server));
if (feedRetriever == null) throw new ArgumentNullException(nameof(feedRetriever));
#endregion
_server = server;
_feedRetriever = feedRetriever;
if (File.Exists(AppListPath + AppListLastSyncSuffix)) _appListLastSync = XmlStorage.LoadXml<AppList>(AppListPath + AppListLastSyncSuffix);
else
{
_appListLastSync = new AppList();
_appListLastSync.SaveXml(AppListPath + AppListLastSyncSuffix);
}
}
#endregion