Exemple #1
0
 public bool HasValidator(ECsvWorkType type)
 {
     /*if (_validators != null) {
      * foreach (FCsvValidator validator in _validators) {
      *    if (type == validator.Type) {
      *       return true;
      *    }
      * }
      * }*/
     return(false);
 }
Exemple #2
0
 public bool HasValidator(ECsvWorkType type)
 {
     for (int n = 0; n < _count; n++)
     {
         if (_values[n].HasValidator(type))
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #3
0
        public void LoadConfig(FXmlNode config)
        {
            _config = config;
            // get type
            string type = config[PTY_TYPE];

            _type = (ECsvWorkType)REnum.ToValue(typeof(ECsvWorkType), type);
            // get validator
            string formator = config[PTY_CLASS];

            try {
                //_formator = (IFormator)RClass.CreateInstance(formator);
            } catch (Exception e) {
                throw new FFatalException(e, "Create formator class failure. (class={0})", formator);
            }
        }
Exemple #4
0
 public bool HasFormator(ECsvWorkType type)
 {
     for (int n = 0; n < _count; n++)
     {
         FCsvHead head = _values[n];
         if (type == ECsvWorkType.Read)
         {
             if (head.ReadFormator != null)
             {
                 return(true);
             }
         }
         else if (type == ECsvWorkType.Write)
         {
             if (head.WriteFormator != null)
             {
                 return(true);
             }
         }
     }
     return(false);
 }