Ejemplo n.º 1
0
        public static string GetDataMapValue(jobdatamapType jobdatamap, string key)
        {
            if (jobdatamap == null || jobdatamap.entry == null)
            {
                return(string.Empty);
            }
            var item = jobdatamap.entry.SingleOrDefault(p => p.key == key);

            if (item != null)
            {
                return(item.value);
            }
            return(string.Empty);
        }
Ejemplo n.º 2
0
 public static string GetJobDataString(jobdatamapType jobData)
 {
     if (jobData != null && jobData.entry != null)
     {
         List <string> ls = new List <string>();
         foreach (var item in jobData.entry)
         {
             if (!string.IsNullOrEmpty(item.value))
             {
                 ls.Add($"{item.key}:{item.value}");
             }
         }
         return(String.Join(",", ls));
     }
     return(String.Empty);
 }