protected override Boolean PatchFile(String fileName) { PatchFinder finder = UXThemePatchFinderFactory.Create(fileName); Patch patch = finder.GetPatchStatus(); if (patch.CanPatch) { patch.ApplyPatch(); Miscellaneous.CorrectPEChecksum(fileName); return(true); } else { File.Delete(fileName); String reason = ""; foreach (PatchEntry entry in patch.Entries) { reason += entry.Status + "; "; } Package.Log.Add(LogSeverity.Warning, "Did not UxTheme Patch: " + fileName + " because \"" + reason + "\", deleted working file"); return(false); } }
public WeatherForecast PatchForecast(Patch <WeatherForecast> input) { var target = new WeatherForecast() { Date = DateTime.UtcNow, Summary = "Sample weather forecast", TemperatureC = 24 }; var result = input.ApplyPatch(target); return(result); }
public CitiesData PatchCities(Patch <CitiesData> input) { var target = new CitiesData() { Cities = new Dictionary <string, string>() { { "Frankfurt", "Germany" }, { "New York", "US" }, { "London", "UK" } } }; var result = input.ApplyPatch(target); return(result); }
public CitiesData PatchCities(Patch <CitiesData> input) { var result = input.ApplyPatch(_targetCities); return(result); }
public WeatherForecast PatchForecast(Patch <WeatherForecast> input) { var result = input.ApplyPatch(_targetWeather); return(result); }