private static void RemoveStdCombination(IStdCombinationsBean receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } receiver.RemoveStdCombination((StdCombination)rep.Related); }
private static void RemoveDependency(IDependencyBean receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } receiver.RemoveDependency((Dependency)rep.Related); }
private static void RemoveTestCase(ITestCasesBean receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } receiver.RemoveTestCase((TestCase)rep.Related); }
private static void RemoveExpectedResult(Effect receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } receiver.RemoveExpectedResult((ExpectedResult)rep.Related); }
private static void RemoveRequirement(IRequirementsBean receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } receiver.RemoveRequirement((Requirement)rep.Related); }
private static void AddEffect(IEffectsBean receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } receiver.AddEffect((Effect)rep.Related); }
private static void RemoveEquivalenceClass(IEquivalenceClassesBean receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } receiver.RemoveEquivalenceClass((EquivalenceClass)rep.Related); }
private static void AddObject(object receiver, DefaultEditParams editParams) { RelationEditParameters rep = editParams as RelationEditParameters; if (rep == null) { return; } // the method works only if the relation of the related is defined by a method called "Add[related.Type]" Type type = receiver.GetType(); Type relatedType = rep.Related.GetType(); MethodInfo minfo = type.GetMethod("Add" + relatedType.Name); if (minfo == null) { return; } object[] param = new object[1]; param[0] = rep.Related; minfo.Invoke(receiver, param); }