//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // // [....] // [....] //------------------------------------------------------------------------------ namespace System.Data.Common { using System.Data; using System.Data.Metadata.Edm; /// /// FieldMetadata class providing the correlation between the column ordinals and MemberMetadata. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")] public struct FieldMetadata { private readonly EdmMember _fieldType; private readonly int _ordinal; /// /// Used to construct a field metadata object relating a column ordinal and an ImemberMetadata. /// /// Column oridnal /// Metadata member public FieldMetadata(int ordinal, EdmMember fieldType) { if (ordinal < 0) { throw EntityUtil.ArgumentOutOfRange("ordinal"); } if (null == fieldType) { throw EntityUtil.ArgumentNull("fieldType"); } _fieldType = fieldType; _ordinal = ordinal; } /// /// Metadata member. /// public EdmMember FieldType { get { return _fieldType; } } /// /// Column ordinal. /// public int Ordinal { get { return _ordinal; } } } }