IsValid() публичный Метод

public IsValid ( ) : bool
Результат bool
 public int AddTag(EstimatorTag tag)
 {
     if (tag.IsValid())
       {
     int index = FindTag(tag.Id());
     if (index < 0)
     {
       m_a.Add(tag);
       return m_a.Count - 1;
     }
       }
       return -1;
 }
Пример #2
0
 public int AddTag(EstimatorTag tag)
 {
     if (tag.IsValid())
     {
         int index = FindTag(tag.Id());
         if (index < 0)
         {
             m_a.Add(tag);
             return(m_a.Count - 1);
         }
     }
     return(-1);
 }
Пример #3
0
        private bool ParseDelimitedFile(StreamReader reader)
        {
            bool rc = false;

            if (null == reader)
            {
                return(rc);
            }

            try
            {
                do
                {
                    string line = reader.ReadLine();
                    if (line.Length > 0)    // Skip empty lines
                    {
                        if (line[0] != ';') // Skip comment lines
                        {
                            string[] items = line.Split(';');
                            if (items.Length == 3)
                            {
                                EstimatorTag tag = new EstimatorTag(items);
                                if (tag.IsValid())
                                {
                                    m_tag_table.AddTag(tag);
                                }
                            }
                        }
                    }
                }while (reader.Peek() != -1);

                rc = true;
            }

            catch
            {
            }

            return(rc);
        }
        private bool ParseDelimitedFile(StreamReader reader)
        {
            bool rc = false;

              if (null == reader)
            return rc;

              try
              {
            do
            {
              string line = reader.ReadLine();
              if (line.Length > 0) // Skip empty lines
              {
            if (line[0] != ';') // Skip comment lines
            {
              string[] items = line.Split(';');
              if (items.Length == 3)
              {
                EstimatorTag tag = new EstimatorTag(items);
                if (tag.IsValid())
                  m_tag_table.AddTag(tag);
              }
            }
              }
            }
            while (reader.Peek() != -1);

            rc = true;
              }

              catch
              {
              }

              return rc;
        }