Exemplo n.º 1
0
        public static ClrEnumMemberAnnotation GetClrEnumMemberAnnotation(this IEdmModel edmModel, IEdmEnumType enumType)
        {
            if (edmModel == null)
            {
                throw Error.ArgumentNull("edmModel");
            }

            ClrEnumMemberAnnotation annotation = edmModel.GetAnnotationValue <ClrEnumMemberAnnotation>(enumType);

            if (annotation != null)
            {
                return(annotation);
            }

            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the Enum member annotations.
        /// </summary>
        /// <param name="edmModel">The Edm model.</param>
        /// <param name="enumType">The Enum Type.</param>
        /// <returns>The Enum member annotation.</returns>
        public static ClrEnumMemberAnnotation GetClrEnumMemberAnnotation(this IEdmModel edmModel, IEdmEnumType enumType)
        {
            if (edmModel == null)
            {
                throw new ArgumentNullException(nameof(edmModel));
            }

            if (enumType == null)
            {
                throw new ArgumentNullException(nameof(enumType));
            }

            ClrEnumMemberAnnotation annotation = edmModel.GetAnnotationValue <ClrEnumMemberAnnotation>(enumType);

            if (annotation != null)
            {
                return(annotation);
            }

            return(null);
        }