Esempio n. 1
0
        public static Tolerance Instantiate(ColumnType type, string value)
        {
            if (string.IsNullOrEmpty(value) || string.IsNullOrWhiteSpace(value))
            {
                return(null);
            }

            Tolerance tolerance = null;

            switch (type)
            {
            case ColumnType.Text:
                tolerance = new TextToleranceFactory().Instantiate(value);
                break;

            case ColumnType.Numeric:
                tolerance = new NumericToleranceFactory().Instantiate(value);
                break;

            case ColumnType.DateTime:
                tolerance = new DateTimeToleranceFactory().Instantiate(value);
                break;

            case ColumnType.Boolean:
                break;

            default:
                break;
            }

            return(tolerance);
        }
Esempio n. 2
0
        public static Tolerance Instantiate(ColumnType type, string value)
        {
            Tolerance tolerance = null;

            switch (type)
            {
            case ColumnType.Text:
                break;

            case ColumnType.Numeric:
                tolerance = new NumericToleranceFactory().Instantiate(value);
                break;

            case ColumnType.DateTime:
                tolerance = new DateTimeToleranceFactory().Instantiate(value);
                break;

            case ColumnType.Boolean:
                break;

            default:
                break;
            }

            return(tolerance);
        }
Esempio n. 3
0
        public static Tolerance Instantiate(ColumnType type, string value)
        {
            Tolerance tolerance=null;
            switch (type)
            {
                case ColumnType.Text:
                    break;
                case ColumnType.Numeric:
                    tolerance = new NumericToleranceFactory().Instantiate(value);
                    break;
                case ColumnType.DateTime:
                    tolerance = new DateTimeToleranceFactory().Instantiate(value);
                    break;
                case ColumnType.Boolean:
                    break;
                default:
                    break;
            }

            return tolerance;
        }