Exemple #1
0
        internal WSParam Clone()
        {
            WSParam param = new WSParam(CODE, NAME, DataType, func);

            param.DISPLAY_NAME     = DISPLAY_NAME;
            param.READ_ACCESS_MODE = READ_ACCESS_MODE != null?READ_ACCESS_MODE.Clone() : new WSAccessMode(WSConstants.ACCESS_LEVEL.READ);

            param.WRITE_ACCESS_MODE = WRITE_ACCESS_MODE != null?WRITE_ACCESS_MODE.Clone() : new WSAccessMode(WSConstants.ACCESS_LEVEL.UPDATE);

            param.SkipEmpty      = SkipEmpty;
            param.ALLOWED_VALUES = (ALLOWED_VALUES != null && ALLOWED_VALUES.Any()) ? ALLOWED_VALUES.Select(x => x.Clone()).ToList() : new List <WSValue>();
            param.ALIACES        = (ALIACES != null && ALIACES.Any()) ? ALIACES.Select(x => x).ToList() : new List <string>();
            param.DESCRIPTION    = DESCRIPTION;

            return(param);
        }
Exemple #2
0
 public bool Match(WSValue value)
 {
     try {
         return(value != null && (ALIACES.Any(x => value.ALIACES.Any(v => x.Equals(v))) || value.NAME.ToLower().Equals(NAME.ToLower())));
     } catch (Exception) { } return(false);
 }