public static void FillValues(this IRootCause rootCause, IDictionary <string, object> dict) { object index; if (dict.TryGetValue("index", out index)) { rootCause.Index = Convert.ToString(index); } object reason; if (dict.TryGetValue("reason", out reason)) { rootCause.Reason = Convert.ToString(reason); } object resourceId; if (dict.TryGetValue("resource.id", out resourceId)) { rootCause.ResourceId = Convert.ToString(resourceId); } object resourceType; if (dict.TryGetValue("resource.type", out resourceType)) { rootCause.ResourceType = Convert.ToString(resourceType); } object type; if (dict.TryGetValue("type", out type)) { rootCause.Type = Convert.ToString(type); } }
/// <summary> /// Add a root cause to the analysis /// </summary> /// <param name="rootCause"></param> internal void AddRootCause(IRootCause rootCause) { Assert.IsNotNull(rootCause, "Root cause can't be null"); this.rootCauseContainer.Add(rootCause); }
/// <summary> /// Add a root cause to container /// </summary> /// <param name="rootCause"></param> internal void Add(IRootCause rootCause) { this.rootCauseList.Add(rootCause); }