Exemple #1
0
 /// <summary>
 /// Reads the AIID from an <see cref="IDataRecord"/>.
 /// </summary>
 /// <param name="r"><see cref="IDataRecord"/> to read the AIID from.</param>
 /// <param name="name">The name of the field to read the value from.</param>
 /// <returns>The AIID read from the <see cref="IDataRecord"/>.</returns>
 public static AIID GetAIID(this IDataRecord r, string name)
 {
     return(AIID.Read(r, name));
 }
        /// <summary>
        /// Gets the name of the AI for the given <see cref="AIID"/>.
        /// </summary>
        /// <param name="aiID">The <see cref="AIID"/> to get the AI name for.</param>
        /// <returns>
        /// The name of the AI for the given <paramref name="aiID"/>, or null if the
        /// <paramref name="aiID"/> is invalid or does not correspond to an AI.
        /// </returns>
        public string GetAIName(AIID aiID)
        {
            var type = GetAIType(aiID);

            return(GetAIName(type));
        }
Exemple #3
0
 /// <summary>
 /// Reads the AIID from an <see cref="IDataRecord"/>.
 /// </summary>
 /// <param name="r"><see cref="IDataRecord"/> to read the AIID from.</param>
 /// <param name="i">The field index to read.</param>
 /// <returns>The AIID read from the <see cref="IDataRecord"/>.</returns>
 public static AIID GetAIID(this IDataRecord r, int i)
 {
     return(AIID.Read(r, i));
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AIAttribute"/> class.
 /// </summary>
 /// <param name="id">The unique ID of the AI. This must be unique for each individual attribute, and must
 /// be a valid value for the <see cref="AIID"/>.</param>
 public AIAttribute(int id)
 {
     _id = new AIID(id);
 }