Пример #1
0
        private ValueGetter <uint> GetScoreColumnSetId(Schema schema)
        {
            int  c;
            var  max = schema.GetMaxMetadataKind(out c, MetadataUtils.Kinds.ScoreColumnSetId);
            uint id  = checked (max + 1);

            return
                ((ref uint dst) => dst = id);
        }
Пример #2
0
        protected ScorerBindingsBase(Schema input, ISchemaBoundMapper mapper, string suffix, bool user, params string[] namesDerived)
            : base(input, user, GetOutputNames(mapper, suffix, namesDerived))
        {
            Contracts.AssertValue(mapper);
            Contracts.AssertValueOrNull(suffix);
            Contracts.AssertValue(namesDerived);

            Mapper = mapper;
            DerivedColumnCount = namesDerived.Length;
            Suffix = suffix ?? "";

            int c;
            var max = input.GetMaxMetadataKind(out c, MetadataUtils.Kinds.ScoreColumnSetId);
            _crtScoreSet = checked(max + 1);
            _getScoreColumnSetId = GetScoreColumnSetId;
        }