internal static PicsChanges Create(CMsgClientPICSChangesSinceResponse changes) { return(new PicsChanges(changes.current_change_number, changes.since_change_number, changes.app_changes.Select(c => AppChange.Create(c)).ToList(), changes.package_changes.Select(c => PackageChange.Create(c)).ToList(), changes.force_full_update, changes.force_full_app_update, changes.force_full_package_update)); }
internal PICSChangesCallback(CMsgClientPICSChangesSinceResponse msg) { LastChangeNumber = msg.since_change_number; CurrentChangeNumber = msg.current_change_number; RequiresFullUpdate = msg.force_full_update; PackageChanges = new Dictionary <uint, PICSChangeData>(); AppChanges = new Dictionary <uint, PICSChangeData>(); foreach (var package_change in msg.package_changes) { PackageChanges.Add(package_change.packageid, new PICSChangeData(package_change)); } foreach (var app_change in msg.app_changes) { AppChanges.Add(app_change.appid, new PICSChangeData(app_change)); } }
internal PICSChangesCallback(JobID jobID, CMsgClientPICSChangesSinceResponse msg) { JobID = jobID; LastChangeNumber = msg.since_change_number; CurrentChangeNumber = msg.current_change_number; RequiresFullUpdate = msg.force_full_update; RequiresFullAppUpdate = msg.force_full_app_update; RequiresFullPackageUpdate = msg.force_full_package_update; PackageChanges = new Dictionary <uint, PICSChangeData>(); AppChanges = new Dictionary <uint, PICSChangeData>(); foreach (var package_change in msg.package_changes) { PackageChanges[package_change.packageid] = new PICSChangeData(package_change); } foreach (var app_change in msg.app_changes) { AppChanges[app_change.appid] = new PICSChangeData(app_change); } }