Exemple #1
0
        /// <summary>
        /// Gets the constant name.
        /// </summary>
        /// <param name="constant">Constant id (see <see cref="NdapiConstants"/>).</param>
        /// <returns>The constant name.</returns>
        public static string GetConstantName(int constant)
        {
            string name;
            var    status = NativeMethods.d2fprgcn_GetConstName(NdapiContext.GetContext(), constant, out name);

            Ensure.Success(status);
            return(name);
        }
Exemple #2
0
        /// <summary>
        /// Gets the value name.
        /// </summary>
        /// <param name="property">Property id (see <see cref="NdapiConstants"/>).</param>
        /// <param name="value">Value id (see <see cref="NdapiConstants"/>).</param>
        /// <returns>The value name.</returns>
        public static string GetValueName(int property, int value)
        {
            string name;
            var    status = NativeMethods.d2fprgvn_GetValueName(NdapiContext.GetContext(), property, value, out name);

            Ensure.Success(status);
            return(name);
        }
Exemple #3
0
        /// <summary>
        /// Gets the constant value.
        /// </summary>
        /// <param name="constant">Constant name.</param>
        /// <returns>The constant value.</returns>
        public static int GetConstantValue(string constant)
        {
            int value;
            var status = NativeMethods.d2fprgcv_GetConstValue(NdapiContext.GetContext(), constant, out value);

            Ensure.Success(status);
            return(value);
        }
Exemple #4
0
 /// <summary>
 /// Gets the property type.
 /// </summary>
 /// <param name="property">Property id (see <see cref="NdapiConstants"/>).</param>
 /// <returns>The property type.</returns>
 public static PropertyType GetPropertyType(int property) => NativeMethods.d2fprgt_GetType(NdapiContext.GetContext(), property);