/// <summary> /// Set the specified specialTags\Specialtags to the eFlow object. /// </summary> /// <param name="eflowObject"></param> /// <param name="setExceptions"></param> /// <returns></returns> public static bool SetExceptions(ISupportsSpecialTags eflowObject, Dictionary <String, String> setExceptions) { try { if (eflowObject == null || setExceptions == null || setExceptions.Count <= 0) { return(false); } foreach (KeyValuePair <String, String> kv in setExceptions) { if (eflowObject.AttachedSpecialTags.Contains(kv.Key)) { String tor = eflowObject.AttachedSpecialTags[kv.Key].TagOrigin ?? String.Empty; if (tor.CompareTo(kv.Value) == 0) { continue; } eflowObject.RemoveSpecialTag(kv.Key); } eflowObject.AddSpecialTag(kv.Key, kv.Value); } } catch (Exception ex) { ILog.LogError(ex); } return(false); }
/// <summary> /// Get the specialTags of the specified eFlow object. /// </summary> /// <param name="eflowObject">The eFlow object to get it's SpecialTags</param> /// <returns>A dictionary of Key values when successfull.</returns> public static Dictionary <String, String> GetSpecialTags(ISupportsSpecialTags eflowObject) { Dictionary <String, String> result = new Dictionary <String, String>(); try { foreach (ITisSpecialTagData sp in eflowObject.AttachedSpecialTags) { result.Add(sp.Name, sp.TagOrigin ?? String.Empty); } } catch (Exception ex) { ILog.LogError(ex); } return(result); }