示例#1
0
      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);
      }
示例#2
0
      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);
                }
              }
            }
          }
        }
      }
示例#3
0
      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);
            }
          }
        }
      }
示例#4
0
      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);
            }
          }
        }
      }