Ejemplo n.º 1
0
        public static string RetrieveFromDict(Dictionary<string, string> _inputDict, string _keyName)
        {
            string _outValue = null;
            _inputDict.TryGetValue(_keyName, out _outValue);

            return _outValue;
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public static Dictionary<string, string> AddToDict(Dictionary<string, string> _dict, string _key, string _value)
 {
     _dict[_key] = _value;
     return _dict;
 }
Ejemplo n.º 5
0
 public static void WriteOutputDict(Dictionary<string, string> _dict, string _tempPath, string _name)
 {
     // To XML
     string OutputXmlFile = _tempPath + _name + ".xml";
     Helper.Serializer.SerializeDictionaryToFile(_dict, OutputXmlFile);
 }