public static CMEffectUI getTestData() { CMEffectUI ef = new CMEffectUI(); ef.Id = 1; ef.Description = "description"; ef.RiskLevel = 6; ef.EffectState = State.POSITIVE; return(ef); }
public static IList <CMEffectUI> transformToListOfCMEffectUI(IList <Effect> __realEffectList) { IList <CMEffectUI> listResult = new List <CMEffectUI>(); if (__realEffectList != null) { foreach (Effect realEffect in __realEffectList) { CMEffectUI newMaskEff = new CMEffectUI(realEffect); listResult.Add(newMaskEff); } } return(listResult); }
// Indicates if an object is the same, checking the id of the element. public override bool Equals(object obj) { if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } // safe because of the GetType check CMEffectUI ele = (CMEffectUI)obj; // use this pattern to compare value members if (Id == 0 || ele.Id == 0) { return(Name.Equals(ele.Name)); } return(Id.Equals(ele.Id)); }
public static IList <CMEffectUI> getTestDataCollection() { IList <CMEffectUI> list = new List <CMEffectUI>(); CMEffectUI ef = new CMEffectUI(); ef.Id = 1; ef.Description = "description1"; ef.RiskLevel = 6; ef.EffectState = State.POSITIVE; CMEffectUI ef2 = new CMEffectUI(); ef.Id = 2; ef.Description = "description2"; ef.RiskLevel = 10; ef.EffectState = State.FAULTY; list.Add(ef); list.Add(ef2); return(list); }
private static void fillEffectReal(CMEffectUI __effectMask, Effect __realEffect) { __realEffect.Description = __effectMask.Description; __realEffect.CurrentState = __effectMask.EffectState; __realEffect.RiskLevel = __effectMask.RiskLevel; }