protected override string AddType(Type type)
        {
            var schemaName = type.Name.Replace("`", string.Empty);

            if (Types.Contains(type))
            {
                return(schemaName);
            }

            var schema = schemaBuilder.Get(type);

            if (string.IsNullOrWhiteSpace(schema))
            {
                return(string.Empty);
            }

            // handle case of different types with same class name
            if (Schemas.ContainsKey(schemaName))
            {
                schemaName = GetUniqueSchemaName(schemaName);
            }

            Schemas.Add(schemaName, schema);
            Types.Add(type);

            return(schemaName);
        }
 public ApplicationSchemaDefinition Schema(ApplicationMetadataSchemaKey key, bool throwException = false)
 {
     if (Schemas.ContainsKey(key))
     {
         return(Schemas[key]);
     }
     if (throwException)
     {
         throw key.NotFoundException();
     }
     return(null);
 }