public static ServiceTypeMetadata GetServiceTypeMetadata(Type serviceType)
        {
            ServiceTypeMetadata metadata = null;

            if (!serviceTypesMetadataList.TryGetValue(serviceType, out metadata))
            {
                metadata = GetDefaultServiceTypeMetadata(serviceType);
            }

            return(metadata);
        }
 public static void AddMetadata(Type serviceType, ServiceTypeMetadata metadata)
 {
     if (!serviceTypesMetadataList.ContainsKey(serviceType))
     {
         if (metadata != null)
         {
             serviceTypesMetadataList.TryAdd(serviceType, metadata);
         }
         else
         {
             serviceTypesMetadataList.TryAdd(serviceType,
                                             GetDefaultServiceTypeMetadata(serviceType));
         }
     }
 }