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) }; }
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 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; }
/// <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(); }
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), }; }
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), }; }
public UnionSubclassPluralizedTableApplier(IInflector inflector) : base(inflector) { }
public DefaultTableizeRuleApplier(IInflector inflector) { this.inflector = inflector; }
protected BaseGenerator(IInflector inf) { Inf = inf; }
public JoinedSubclassPluralizedTableApplier(IInflector inflector) : base(inflector) { }
public ClassPluralizedTableApplier(IInflector inflector) : base(inflector) { }
public SeedScriptRunner(SeedScriptRunnerOptions options, IConfigurationRoot configurationRoot, IInflector inf) : base(inf) { this.options = options; this.configurationRoot = configurationRoot; }
public DatabaseCleaner(IConfigurationRoot configurationRoot, DatabaseCleanerOptions options, IInflector inf) : base(inf) { this.configurationRoot = configurationRoot; this.options = options; }
static Inflector() { _inflector = new EnglishInflector(); }
internal FluentStringInflector(string value, IInflector inflector) { this.value = value; this.inflector = inflector; }
/// <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)); }
/// <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)); }
public CollectionOfComponentsTableApplier(IDomainInspector domainInspector, IInflector inflector) : base(domainInspector) { this.inflector = inflector; }
static Inflector() { _inflector = new SpanishInflector(); }
internal FluentNumberInflector(Int64 value, IInflector inflector) { this.value = value; this.inflector = inflector; }
public SeedDataGenerator(SeedDataGeneratorOptions options, IMetadataProvider provider, IInflector inflector, IConfigurationRoot configurationRoot) : base(provider, inflector, options.ConnectionName) { this.options = options; this.configurationRoot = configurationRoot; }
public EntityFrameworkCoreReverseModelGenerator(IMetadataProvider provider, IInflector inf, EntityFrameworkCoreReverseModelGeneratorOptions options) : base(provider, inf, options.ConnectionName) { this.options = options; }
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 FluentDecimalInflector(Decimal value, IInflector inflector) { this.value = value; this.inflector = inflector; }