コード例 #1
0
        private MetadataUtils.MetadataGetter <uint> GetScoreColumnSetId(ISchema schema)
        {
            int  c;
            var  max = schema.GetMaxMetadataKind(out c, MetadataUtils.Kinds.ScoreColumnSetId);
            uint id  = checked (max + 1);

            return
                ((int col, ref uint dst) => dst = id);
        }
コード例 #2
0
        protected ScorerBindingsBase(ISchema 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;
        }