Ejemplo n.º 1
0
            protected override bool TryParse(string str)
            {
                Contracts.AssertNonEmpty(str);

                // We accept N:T:S where N is the new column name, T is the new type,
                // and S is source column names.
                string extra;

                if (!base.TryParse(str, out extra))
                {
                    return(false);
                }
                if (extra == null)
                {
                    return(true);
                }

                InternalDataKind kind;

                if (!TypeParsingUtils.TryParseDataKind(extra, out kind, out KeyCount))
                {
                    return(false);
                }
                ResultType = InternalDataKind2DataKind(kind);
                return(true);
            }
Ejemplo n.º 2
0
            private protected override bool TryParse(string str)
            {
                Contracts.AssertNonEmpty(str);

                // We accept N:T:S where N is the new column name, T is the new type,
                // and S is source column names.
                if (!base.TryParse(str, out string extra))
                    return false;
                if (extra == null)
                    return true;

                if (!TypeParsingUtils.TryParseDataKind(extra, out DataKind kind, out KeyCount))
                    return false;
                ResultType = kind == default ? default(DataKind?) : kind;
                return true;
            }