Esempio n. 1
0
 public static int GetFieldIndex([NotNull] ITable table,
                                 [NotNull] ObjectAttribute objectAttribute,
                                 [CanBeNull] IFieldIndexCache fieldIndexCache = null)
 {
     return
         (fieldIndexCache?.GetFieldIndex(table, objectAttribute.Name, objectAttribute.Role) ??
          GetFieldIndex(table, objectAttribute.Name, objectAttribute.Role));
 }
Esempio n. 2
0
 public static int GetFieldIndex([NotNull] ITable table,
                                 [NotNull] AssociationAttribute associationAttribute,
                                 [CanBeNull] IFieldIndexCache fieldIndexCache = null)
 {
     return
         (fieldIndexCache?.GetFieldIndex(table, associationAttribute.Name, null) ??
          GetFieldIndex(table, associationAttribute.Name, null));
 }
Esempio n. 3
0
        public static int GetFieldIndex([NotNull] ITable table,
                                        [NotNull] Attribute attribute,
                                        [CanBeNull] IFieldIndexCache fieldIndexCache = null)
        {
            AttributeRole attributeRole = (attribute as ObjectAttribute)?.Role;

            return
                (fieldIndexCache?.GetFieldIndex(table, attribute.Name, attributeRole) ??
                 GetFieldIndex(table, attribute.Name, attributeRole));
        }