Beispiel #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);
        }
Beispiel #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);
        }
        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;
        }