Example #1
0
        /// <summary>Determines if the specified value represents the name of a FHIR primitive data type.</summary>
        public static bool IsPrimitive(string name)
        {
            if (String.IsNullOrEmpty(name))
            {
                return(false);
            }

            return(FhirTypeToCsType.ContainsKey(name) && Char.IsLower(name[0]));
        }
Example #2
0
        /// <summary>Determines if the specified value represents the name of a FHIR complex data type (NOT including resources and primitives).</summary>
        public static bool IsDataType(string name)
        {
            if (String.IsNullOrEmpty(name))
            {
                return(false);
            }

            return(FhirTypeToCsType.ContainsKey(name) && !IsKnownResource(name) && !IsPrimitive(name));
        }
Example #3
0
 public static Type GetTypeForFhirType(string name)
 {
     if (!FhirTypeToCsType.ContainsKey(name))
     {
         return(null);
     }
     else
     {
         return(FhirTypeToCsType[name]);
     }
 }
Example #4
0
        /// <summary>Returns the C# <see cref="Type"/> that represents the FHIR type with the specified name, or <c>null</c>.</summary>
        public static Type GetTypeForFhirType(string name)
        {
            // [WMR 20160421] Optimization
            //if (!FhirTypeToCsType.ContainsKey(name))
            //    return null;
            //else
            //    return FhirTypeToCsType[name];
            Type result;

            FhirTypeToCsType.TryGetValue(name, out result);
            return(result);
        }
Example #5
0
 public static bool IsDataType(string name)
 {
     return(FhirTypeToCsType.ContainsKey(name) && !IsKnownResource(name) && !IsPrimitive(name));
 }
Example #6
0
 public static bool IsPrimitive(string name)
 {
     return(FhirTypeToCsType.ContainsKey(name) && Char.IsLower(name[0]));
 }
Example #7
0
 /// <summary>Determines if the specified value represents the name of a core Resource, Datatype or primitive.</summary>
 public static bool IsCoreModelType(string name) => FhirTypeToCsType.ContainsKey(name);