Exemplo n.º 1
0
        public static DatabaseMetadataConfiguration AddDocumentTypes(this DatabaseMetadataConfiguration configuration, Assembly assembly, String fullNamePrefix = null)
        {
            var result = GetTypesWithAttribute <DocumentAttribute>(new[] { assembly });

            if (fullNamePrefix != null)
            {
                result = result
                         .Where(t => t.FullName != null && t.FullName.StartsWith(fullNamePrefix));
            }

            configuration.DocumentTypes.AddRange(result);
            return(configuration);
        }
Exemplo n.º 2
0
 public static DatabaseMetadataConfiguration AddDocumentType <TDocument>(this DatabaseMetadataConfiguration configuration)
 {
     configuration.DocumentTypes.Add(typeof(TDocument));
     return(configuration);
 }
Exemplo n.º 3
0
 public static DatabaseMetadataConfiguration SetTwoLevelListsSupport(this DatabaseMetadataConfiguration configuration, Boolean supported)
 {
     configuration.TwoLevelListSupported = supported;
     return(configuration);
 }
Exemplo n.º 4
0
 public static DatabaseMetadataConfiguration AddDocumentType(this DatabaseMetadataConfiguration configuration, Type documentType)
 {
     configuration.DocumentTypes.Add(documentType);
     return(configuration);
 }