public static string RetrieveFromDict(Dictionary<string, string> _inputDict, string _keyName) { string _outValue = null; _inputDict.TryGetValue(_keyName, out _outValue); return _outValue; }
public static void WriteOutputRequest(string _parameter, string _value, string _tempPath) { // To XML Dictionary<string, string> outputDict = new Dictionary<string, string>(); string OutputXmlFile = _tempPath + "_" + _parameter + ".xml"; outputDict[_parameter] = _value.ToString(); Helper.Serializer.SerializeDictionaryToFile(outputDict, OutputXmlFile); }
public static void WriteLog(Dictionary<string, string> logDictionary, TraceEventType logType, bool methodSuccess) { LogEntry logEntry = new LogEntry(); string logMessage = "Operation Success" + ": " + methodSuccess.ToString() + "\n" + "\n"; foreach (KeyValuePair<string, string> pair in logDictionary) { logMessage += pair.Key + ": " + pair.Value + "\n"; } logEntry.Message = logMessage; logEntry.Severity = logType; logEntry.Title = GetMethodName(); Logger.Write(logEntry); }
public static Dictionary<string, string> AddToDict(Dictionary<string, string> _dict, string _key, string _value) { _dict[_key] = _value; return _dict; }
public static void WriteOutputDict(Dictionary<string, string> _dict, string _tempPath, string _name) { // To XML string OutputXmlFile = _tempPath + _name + ".xml"; Helper.Serializer.SerializeDictionaryToFile(_dict, OutputXmlFile); }