public Collection<string> ContentNames () { var names = new Collection<string> (); if (HasContentTest) { var list = TestCollection .OrderBy (p => p.GadgetName) .ToList () ; foreach (var item in list) { names.Add (" - " + item.GadgetName); } } if (HasContentTarget) { var list = TargetCollection .OrderBy (p => p.GadgetName) .ToList () ; foreach (var item in list) { names.Add (" - " + item.GadgetName); } } return (names); }
public void Request (IList<string> collection, bool useSeparator, bool full) { if (collection.NotNull ()) { if (IsEmpty.IsFalse ()) { var separator = useSeparator ? " - " : string.Empty; collection.Clear (); if (HasContentTest) { var testList = TestCollection .OrderBy (p => p.GadgetName) .ToList () ; foreach (var gadgetTest in testList) { collection.Add (separator + gadgetTest.GadgetName); if (gadgetTest.HasContentTarget) { var namesCollection = new Collection<string> (); if (full) { gadgetTest.RequestContentNamesFull (namesCollection); } else { gadgetTest.RequestContentNames (namesCollection); } foreach (var itemName in namesCollection) { collection.Add (separator + itemName); } } } } if (HasContentTarget) { var list = TargetCollection .OrderBy (p => p.GadgetName) .ToList () ; foreach (var item in list) { if (full) { var str = $"{separator}{item.GadgetName} :{item.Reference}" + $"{Environment.NewLine}" + $" resultado: [ {item.Value} ]" + $"{Environment.NewLine}"; collection.Add (str); } else { collection.Add (separator + item.GadgetName); } } } } } }
internal void Request (IList<GadgetTest> collection) { if (collection.NotNull ()) { if (IsEmpty.IsFalse ()) { collection.Clear (); var list = TestCollection .OrderBy (p => p.GadgetName) .ToList () ; foreach (var item in list) { collection.Add (item); } } } }
internal void Request (IList<string> collection, bool useSeparator) { if (collection.NotNull ()) { if (IsEmpty.IsFalse ()) { var separator = useSeparator ? " - " : string.Empty; collection.Clear (); var list = TestCollection .OrderBy (p => p.GadgetName) .ToList () ; foreach (var item in list) { collection.Add (separator + item.GadgetName); } } } }