private static PackageConfig ModifyConfigByProperty(PackageConfig configObject, IDictionary<string, string> properties) { if (!properties.Any()) { return configObject; } string configString = XmlService.XmlSerializeToString(configObject); configString = ModifyConfigByProperty(configString, properties); return XmlService.XmlDeserializeFromString<PackageConfig>(configString); }
private static OperationResult XmlPoke(PackageConfig packageConfig) { if (!packageConfig.XmlPoke.Any()) { Logger.Instance.WriteLog.Info(CommonResources.MsgPropertyNotExistInConfigFile.GetStringByFormat("XmlPoke")); return null; } Logger.Instance.WriteLog.Info("XmlPoke started"); OperationResult result = new OperationResult(); foreach (XmlPoke poke in packageConfig.XmlPoke) { OperationResult newResult = new XmlPokeTask(poke).Execute(); result = result.СombineResult(newResult); } Logger.Instance.WriteLog.Info("XmlPoke finished"); return result; }
private OperationResult XmlPeek(PackageConfig packageConfig) { if (!packageConfig.XmlPeek.Any()) { Logger.Instance.WriteLog.Info(CommonResources.MsgPropertyNotExistInConfigFile.GetStringByFormat("XmlPeek")); return null; } Logger.Instance.WriteLog.Info("XmlPeek started"); OperationResult result = new OperationResult(); foreach (XmlPeek peek in packageConfig.XmlPeek) { OperationResult newResult = new XmlPeekTask(peek, configurationFileManager).Execute(); result = result.СombineResult(newResult); } Logger.Instance.WriteLog.Info("XmlPeek finished"); return result; }