private void UpdateThensList() { Thens.Clear(); foreach (Then then in Rule.Thens) { Type thenModelType = typeof(ThenViewModel <>).MakeGenericType(then.GetType()); ThenViewModel thenViewModel = Container.GetExports(typeof(ThenViewModel <>).MakeGenericType(then.GetType()), null, null).FirstOrDefault()?.Value as ThenViewModel; if (thenViewModel != null) { thenModelType.GetMethod("SetModels").Invoke(thenViewModel, new object[] { this, then }); Thens.Add(thenViewModel); } } }
public CodeCompletionFeatureSteps Then(string text) { Thens.Add(text); return(this); }