Exemplo n.º 1
0
 public PluralizedTablesPack(IDomainInspector domainInspector, IInflector inflector)
 {
     if (domainInspector == null)
     {
         throw new ArgumentNullException("domainInspector");
     }
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     rootClass = new List <IPatternApplier <Type, IClassAttributesMapper> >
     {
         new ClassPluralizedTableApplier(inflector)
     };
     joinedSubclass = new List <IPatternApplier <Type, IJoinedSubclassAttributesMapper> >
     {
         new JoinedSubclassPluralizedTableApplier(inflector)
     };
     unionSubclass = new List <IPatternApplier <Type, IUnionSubclassAttributesMapper> >
     {
         new UnionSubclassPluralizedTableApplier(inflector)
     };
     collectionPath = new List <IPatternApplier <PropertyPath, ICollectionPropertiesMapper> >
     {
         new ManyToManyPluralizedTableApplier(domainInspector, inflector)
     };
 }
 public PluralizedTablesPack(IDomainInspector domainInspector, IInflector inflector)
 {
     if (domainInspector == null)
     {
         throw new ArgumentNullException("domainInspector");
     }
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     rootClass = new List<IPatternApplier<Type, IClassAttributesMapper>>
                     {
                         new ClassPluralizedTableApplier(inflector)
                     };
     joinedSubclass = new List<IPatternApplier<Type, IJoinedSubclassAttributesMapper>>
                      	{
                      		new JoinedSubclassPluralizedTableApplier(inflector)
                      	};
     unionSubclass = new List<IPatternApplier<Type, IUnionSubclassAttributesMapper>>
                         {
                             new UnionSubclassPluralizedTableApplier(inflector)
                         };
     collectionPath = new List<IPatternApplier<PropertyPath, ICollectionPropertiesMapper>>
                      	{
                      		new ManyToManyPluralizedTableApplier(domainInspector, inflector)
                      	};
 }
Exemplo n.º 3
0
        private static string GetResourceType(object forObject, IInflector inflector)
        {
            var    resourceAttribute = forObject.GetType().GetCustomAttribute <ResourceObjectAttribute>(false);
            string typeName          = forObject.GetType().Name;

            return(resourceAttribute.Type ?? inflector.Pluralize(typeName));
        }
 public InflectorNamingStrategy(IInflector inflector)
 {
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     this.inflector = inflector;
 }
 public InflectorNamingStrategy(IInflector inflector)
 {
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     this.inflector = inflector;
 }
Exemplo n.º 6
0
 public ClassPluralizedTableApplier(IInflector inflector)
 {
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     this.inflector = inflector;
 }
		public ManyToManyPluralizedTableApplier(IDomainInspector domainInspector, IInflector inflector)
			: base(domainInspector)
		{
			if (inflector == null)
			{
				throw new ArgumentNullException("inflector");
			}
			this.inflector = inflector;
		}
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SimpleTagger"/> class.
 /// </summary>
 /// <param name="inflector">The inflector.</param>
 /// <param name="synonymFinder">The synonym finder.</param>
 public SimpleTagger(IInflector inflector, ISynonymFinder synonymFinder)
 {
     Inflector     = inflector;
     SynonymFinder = synonymFinder;
     BuildSuffixes();
     BuildLexicon();
     BuildRules();
     BuildNationalities();
 }
Exemplo n.º 9
0
 public ManyToManyPluralizedTableApplier(IDomainInspector domainInspector, IInflector inflector)
     : base(domainInspector)
 {
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     this.inflector = inflector;
 }
 public DearDbaTablesAndColumnsNamingPack(IDomainInspector domainInspector, IInflector inflector)
 {
     if (domainInspector == null)
     {
         throw new ArgumentNullException("domainInspector");
     }
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     rootClass = new List<IPatternApplier<Type, IClassAttributesMapper>>
                     {
                         new ClassPluralizedTableApplier(inflector),
                         new PoidColumnNameApplier()
                     };
     joinedSubclass = new List<IPatternApplier<Type, IJoinedSubclassAttributesMapper>>
                      	{
                      		new JoinedSubclassPluralizedTableApplier(inflector),
                      		new JoinedSubclassKeyAsRootIdColumnApplier(domainInspector)
                      	};
     unionSubclass = new List<IPatternApplier<Type, IUnionSubclassAttributesMapper>>
                         {
                             new UnionSubclassPluralizedTableApplier(inflector)
                         };
     collectionPath = new List<IPatternApplier<PropertyPath, ICollectionPropertiesMapper>>
                      	{
                      		new ManyToManyPluralizedTableApplier(domainInspector, inflector),
                      		new ManyToManyKeyIdColumnApplier(domainInspector),
                      		new OneToManyKeyColumnApplier(domainInspector),
                      		new CollectionOfElementsTableApplier(domainInspector, inflector),
                      		new CollectionOfElementsKeyColumnApplier(domainInspector),
                      		new CollectionOfComponentsTableApplier(domainInspector, inflector),
                      		new CollectionOfComponentsKeyColumnApplier(domainInspector),
                      	};
     propertyPath = new List<IPatternApplier<PropertyPath, IPropertyMapper>>
                    	{
                    		new ComponentPropertyColumnNameApplier(),
                    	};
     listPath = new List<IPatternApplier<PropertyPath, IListPropertiesMapper>>
                	{
                		new ListIndexAsPropertyPosColumnNameApplier(),
                	};
     manyToOnePath = new List<IPatternApplier<PropertyPath, IManyToOneMapper>>
                         {
                             new ManyToOneColumnApplier()
                         };
     manyToManyPath = new List<IPatternApplier<PropertyPath, IManyToManyMapper>>
                      	{
                      		new ManyToManyColumnApplier(domainInspector),
                      	};
 }
Exemplo n.º 11
0
 public DearDbaTablesAndColumnsNamingPack(IDomainInspector domainInspector, IInflector inflector)
 {
     if (domainInspector == null)
     {
         throw new ArgumentNullException("domainInspector");
     }
     if (inflector == null)
     {
         throw new ArgumentNullException("inflector");
     }
     rootClass = new List <IPatternApplier <Type, IClassAttributesMapper> >
     {
         new ClassPluralizedTableApplier(inflector),
         new PoidColumnNameApplier()
     };
     joinedSubclass = new List <IPatternApplier <Type, IJoinedSubclassAttributesMapper> >
     {
         new JoinedSubclassPluralizedTableApplier(inflector),
         new JoinedSubclassKeyAsRootIdColumnApplier(domainInspector)
     };
     unionSubclass = new List <IPatternApplier <Type, IUnionSubclassAttributesMapper> >
     {
         new UnionSubclassPluralizedTableApplier(inflector)
     };
     collectionPath = new List <IPatternApplier <PropertyPath, ICollectionPropertiesMapper> >
     {
         new ManyToManyPluralizedTableApplier(domainInspector, inflector),
         new ManyToManyKeyIdColumnApplier(domainInspector),
         new OneToManyKeyColumnApplier(domainInspector),
         new CollectionOfElementsTableApplier(domainInspector, inflector),
         new CollectionOfElementsKeyColumnApplier(domainInspector),
         new CollectionOfComponentsTableApplier(domainInspector, inflector),
         new CollectionOfComponentsKeyColumnApplier(domainInspector),
     };
     propertyPath = new List <IPatternApplier <PropertyPath, IPropertyMapper> >
     {
         new ComponentPropertyColumnNameApplier(),
     };
     listPath = new List <IPatternApplier <PropertyPath, IListPropertiesMapper> >
     {
         new ListIndexAsPropertyPosColumnNameApplier(),
     };
     manyToOnePath = new List <IPatternApplier <PropertyPath, IManyToOneMapper> >
     {
         new ManyToOneColumnApplier()
     };
     manyToManyPath = new List <IPatternApplier <PropertyPath, IManyToManyMapper> >
     {
         new ManyToManyColumnApplier(domainInspector),
     };
 }
Exemplo n.º 12
0
 public UnionSubclassPluralizedTableApplier(IInflector inflector) : base(inflector)
 {
 }
 public DefaultTableizeRuleApplier(IInflector inflector)
 {
     this.inflector = inflector;
 }
Exemplo n.º 14
0
 protected BaseGenerator(IInflector inf)
 {
     Inf = inf;
 }
Exemplo n.º 15
0
 public JoinedSubclassPluralizedTableApplier(IInflector inflector) : base(inflector)
 {
 }
 public UnionSubclassPluralizedTableApplier(IInflector inflector)
     : base(inflector)
 {
 }
Exemplo n.º 17
0
 public ClassPluralizedTableApplier(IInflector inflector) : base(inflector)
 {
 }
 public ClassPluralizedTableApplier(IInflector inflector)
     : base(inflector)
 {
 }
Exemplo n.º 19
0
 public SeedScriptRunner(SeedScriptRunnerOptions options, IConfigurationRoot configurationRoot, IInflector inf) : base(inf)
 {
     this.options           = options;
     this.configurationRoot = configurationRoot;
 }
Exemplo n.º 20
0
 public DatabaseCleaner(IConfigurationRoot configurationRoot, DatabaseCleanerOptions options, IInflector inf) : base(inf)
 {
     this.configurationRoot = configurationRoot;
     this.options           = options;
 }
Exemplo n.º 21
0
 static Inflector()
 {
     _inflector = new EnglishInflector();
 }
 internal FluentStringInflector(string value, IInflector inflector)
 {
     this.value = value;
     this.inflector = inflector;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Singularizes a word according to the given inflector, optionally dependant on a <paramref name="number"/>
 /// </summary>
 /// <param name="word"></param>
 /// <param name="inflector"></param>
 /// <param name="number"></param>
 /// <returns></returns>
 public static string ToSingular(this string word, IInflector inflector, int number = 1)
 {
     return(inflector.ToSingular(word, number));
 }
Exemplo n.º 24
0
 /// <summary>
 /// Pluralizes a word according to the given inflector, optionally dependant on a <paramref name="number"/>
 /// </summary>
 /// <param name="word"></param>
 /// <param name="inflector"></param>
 /// <param name="number"></param>
 /// <returns></returns>
 public static string ToPlural(this string word, IInflector inflector, int number = 0)
 {
     return(inflector.ToPlural(word, number));
 }
Exemplo n.º 25
0
 public CollectionOfComponentsTableApplier(IDomainInspector domainInspector, IInflector inflector)
     : base(domainInspector)
 {
     this.inflector = inflector;
 }
Exemplo n.º 26
0
 static Inflector()
 {
     _inflector = new SpanishInflector();
 }
 public DefaultTableizeRuleApplier(IInflector inflector)
 {
     this.inflector = inflector;
 }
 internal FluentNumberInflector(Int64 value, IInflector inflector)
 {
     this.value = value;
     this.inflector = inflector;
 }
Exemplo n.º 29
0
 public SeedDataGenerator(SeedDataGeneratorOptions options, IMetadataProvider provider, IInflector inflector, IConfigurationRoot configurationRoot) : base(provider, inflector, options.ConnectionName)
 {
     this.options           = options;
     this.configurationRoot = configurationRoot;
 }
 public JoinedSubclassPluralizedTableApplier(IInflector inflector)
     : base(inflector)
 {
 }
 public EntityFrameworkCoreReverseModelGenerator(IMetadataProvider provider, IInflector inf, EntityFrameworkCoreReverseModelGeneratorOptions options) : base(provider, inf, options.ConnectionName)
 {
     this.options = options;
 }
Exemplo n.º 32
0
 static Inflector()
 {
     _inflector = new EnglishInflector();
 }
Exemplo n.º 33
0
 protected BaseGeneratorWithMetadata(IMetadataProvider provider, IInflector inf, string connectionName)
     : base(inf)
 {
     this.ConnectionName = connectionName;
     Provider            = provider;
 }
 public CollectionOfElementsColumnApplier(IDomainInspector domainInspector, IInflector inflector)
     : base(domainInspector)
 {
     this.inflector = inflector;
 }
		public CollectionOfElementsColumnApplier(IDomainInspector domainInspector, IInflector inflector)
			: base(domainInspector)
		{
			this.inflector = inflector;
		}
 public FluentDecimalInflector(Decimal value, IInflector inflector)
 {
     this.value = value;
     this.inflector = inflector;
 }