protected override void GetAnnotationCore <TValue>(string kind, int iinfo, ref TValue value) { if (kind == AnnotationUtils.Kinds.ScoreColumnKind) { _getScoreColumnKind.Marshal(iinfo, ref value); return; } if (iinfo < DerivedColumnCount && kind == AnnotationUtils.Kinds.ScoreValueKind) { _getScoreValueKind.Marshal(iinfo, ref value); return; } if (iinfo < DerivedColumnCount && _predColMetadata != null) { var mcol = _predColMetadata.Schema.GetColumnOrNull(kind); if (mcol.HasValue) { // REVIEW: In the event that TValue is not the right type, it won't really be // the "right" type of exception. However considering that I consider the metadata // schema as it stands right now to be temporary, let's suppose we don't really care. _predColMetadata.GetGetter <TValue>(mcol.Value)(ref value); return; } } base.GetAnnotationCore <TValue>(kind, iinfo, ref value); }
protected override void GetAnnotationCore <TValue>(string kind, int iinfo, ref TValue value) { Contracts.Assert(0 <= iinfo && iinfo < InfoCount); if (kind == AnnotationUtils.Kinds.SlotNames) { _slotNamesGetter.Marshal(iinfo, ref value); return; } base.GetAnnotationCore(kind, iinfo, ref value); }
protected override void GetAnnotationCore <TValue>(string kind, int iinfo, ref TValue value) { Contracts.Assert(0 <= iinfo && iinfo < InfoCount); switch (kind) { case AnnotationUtils.Kinds.ScoreColumnSetId: _getScoreColumnSetId.Marshal(iinfo, ref value); break; default: if (iinfo < DerivedColumnCount) { throw AnnotationUtils.ExceptGetAnnotation(); } Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.GetValue(kind, ref value); break; } }