private static KeyValuePair <IUpdateManifest, string> RetrieveUpdateManifest(IDictionary <CommandLineParameter, string> providedParameters) { string strUpdateManifestType = GetParameterValue <string>(CommandLineParameter.UpdateManifestType, providedParameters); UpdateManifestType updateManifestType = UpdateManifestType.Parse(strUpdateManifestType); string updateManifestName = GetParameterValue <string>(CommandLineParameter.UpdateManifestName, providedParameters); if (updateManifestType != null && updateManifestName != null && updateManifestName != string.Empty) { return(UpdateManifestService.Retrieve(updateManifestType, updateManifestName)); } else { return(UpdateManifestService.Retrieve()); } }
public static KeyValuePair <IUpdateManifest, string> Retrieve(UpdateManifestType manifestType, string manifestPath) { IUpdateManifest manifest = null; if (manifestPath == null || manifestPath == string.Empty) { manifestPath = GitHubUpdateManifestFileName; } if (manifestType == UpdateManifestType.GitHub) { manifest = SerializerFactory.GetInstance().Load <GitHubUpdateManifest>(manifestPath); } else { throw new ArgumentException("Manifest type '" + manifestType + "' is not yet handled."); } return(new KeyValuePair <IUpdateManifest, string>(manifest, manifestPath)); }