コード例 #1
0
ファイル: ModelInfo.cs プロジェクト: huberrob/fhir-dstu1
 public static string GetFhirTypeForType(Type type)
 {
     if (!FhirCsTypeToString.ContainsKey(type))
     {
         return(null);
     }
     else
     {
         return(FhirCsTypeToString[type]);
     }
 }
コード例 #2
0
 public static string GetResourceNameForType(Type resourceType)
 {
     if (!FhirCsTypeToString.ContainsKey(resourceType))
     {
         return(null);
     }
     else
     {
         return(FhirCsTypeToString[resourceType]);
     }
 }
コード例 #3
0
ファイル: ModelInfo.cs プロジェクト: vnmcosta/fhir-net-api
        /// <summary>Returns the FHIR type name represented by the specified C# <see cref="Type"/>, or <c>null</c>.</summary>
        public static string GetFhirTypeNameForType(Type type)
        {
            // [WMR 20160421] Optimization
            //if (!FhirCsTypeToString.ContainsKey(type))
            //    return null;
            //else
            //    return FhirCsTypeToString[type];
            string result;

            FhirCsTypeToString.TryGetValue(type, out result);
            return(result);
        }