public static Configuration AddTriggerAuditing(
     this Configuration cfg,
     INamingStrategy namingStrategy)
 {
     new TriggerAuditing(cfg, namingStrategy).Configure();
       return cfg;
 }
		internal Mappings(
			IDictionary classes,
			IDictionary collections,
			IDictionary tables,
			IDictionary queries,
			IDictionary sqlqueries,
			IDictionary resultSetMappings,
			IDictionary imports,
			IList secondPasses,
			IList propertyReferences,
			INamingStrategy namingStrategy,
			IDictionary filterDefinitions,
			IList auxiliaryDatabaseObjects,
			string defaultAssembly,
			string defaultNamespace
			)
		{
			this.classes = classes;
			this.collections = collections;
			this.queries = queries;
			this.sqlqueries = sqlqueries;
			this.resultSetMappings = resultSetMappings;
			this.tables = tables;
			this.imports = imports;
			this.secondPasses = secondPasses;
			this.propertyReferences = propertyReferences;
			this.namingStrategy = namingStrategy;
			this.filterDefinitions = filterDefinitions;
			this.auxiliaryDatabaseObjects = auxiliaryDatabaseObjects;
			this.defaultAssembly = defaultAssembly;
			this.defaultNamespace = defaultNamespace;
		}
 public static Configuration AddTriggerAuditing(
     this Configuration cfg,
     INamingStrategy namingStrategy)
 {
     new TriggerAuditing(cfg, namingStrategy).Configure();
     return(cfg);
 }
Example #4
0
 public AuditTable(Table dataTable,
     INamingStrategy namingStrategy,
     IAuditColumnSource auditColumnSource)
 {
     this.auditColumnSource = auditColumnSource;
       auditTable = BuildAuditTable(dataTable, namingStrategy);
 }
Example #5
0
 public TriggerAuditing(Configuration configuration,
                        INamingStrategy namingStrategy,
                        Func <Table, bool> tableFilter)
     : this(configuration, namingStrategy,
            new AuditColumnSource(), tableFilter)
 {
 }
Example #6
0
 public TriggerAuditing(Configuration configuration,
                        INamingStrategy namingStrategy,
                        IAuditColumnSource auditColumnSource)
     : this(configuration, namingStrategy,
            auditColumnSource, t => !t.Name.Contains("Audit"))
 {
 }
   public TriggerAuditing(Configuration configuration,
       INamingStrategy namingStrategy,
       Func<Table, bool> tableFilter)
       : this(configuration, namingStrategy,
 new AuditColumnSource(), tableFilter)
   {
   }
Example #8
0
   public AuditTable(Table dataTable, 
 INamingStrategy namingStrategy,
 IAuditColumnSource auditColumnSource)
   {
       _auditTable = BuildAuditTable(dataTable,
       namingStrategy, auditColumnSource);
   }
Example #9
0
 public AuditTable(Table dataTable,
                   INamingStrategy namingStrategy,
                   IAuditColumnSource auditColumnSource)
 {
     this.auditColumnSource = auditColumnSource;
     auditTable             = BuildAuditTable(dataTable, namingStrategy);
 }
        protected virtual void ApplyNamingStrategy(EntityTypeBuilder builder,
                                                   INamingStrategy namingStrategy)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            var props = builder.Metadata.GetProperties();

            foreach (var prop in props)
            {
                var name = prop.Name;

                if (namingStrategy != null)
                {
                    name = namingStrategy.GetColumnName(name);
                }

                builder.Property(prop.Name).HasColumnName(name);
            }

            var tableName = builder.Metadata.Name;
            var index     = tableName.LastIndexOf('.');

            tableName = tableName.Substring(index + 1);

            if (namingStrategy != null)
            {
                tableName = namingStrategy.GetTableName(tableName);
            }

            builder.ToTable(tableName);
        }
Example #11
0
   public TriggerAuditing(Configuration configuration,
       INamingStrategy namingStrategy,
       IAuditColumnSource auditColumnSource)
       : this(configuration, namingStrategy,
 auditColumnSource, t => !t.Name.Contains("Audit"))
   {
   }
Example #12
0
 protected Pipeline(PipelineObjectFactory factory, INamingStrategy namingStrategy,
                    IUnknownParameterBehavior unknownParameterBehavior)
 {
     _factory                  = factory ?? throw new ArgumentNullException(nameof(factory));
     _namingStrategy           = namingStrategy ?? throw new ArgumentNullException(nameof(namingStrategy));
     _unknownParameterBehavior = unknownParameterBehavior ?? throw new ArgumentNullException(nameof(unknownParameterBehavior));
 }
Example #13
0
 public AnonymousQueue(INamingStrategy namingStrategy, Dictionary <string, object> arguments)
     : base(namingStrategy.GenerateName(), false, true, true, arguments)
 {
     if (!Arguments.ContainsKey(Queue.X_QUEUE_MASTER_LOCATOR))
     {
         MasterLocator = "client-local";
     }
 }
Example #14
0
   public TriggerAuditing(Configuration configuration,
 INamingStrategy namingStrategy,
 IAuditColumnSource columnSource)
   {
       _configuration = configuration;
         _namingStrategy = namingStrategy;
         _columnSource = columnSource;
   }
 public static Configuration AddTriggerAuditing(
     this Configuration cfg,
     INamingStrategy namingStrategy,
     IAuditColumnSource auditColumnSource)
 {
     new TriggerAuditing(cfg, namingStrategy, auditColumnSource)
     .Configure();
       return cfg;
 }
 public static Configuration AddTriggerAuditing(
     this Configuration cfg,
     INamingStrategy namingStrategy,
     IAuditColumnSource auditColumnSource)
 {
     new TriggerAuditing(cfg, namingStrategy, auditColumnSource)
     .Configure();
     return(cfg);
 }
Example #17
0
 protected virtual Table BuildAuditTable(Table dataTable,
     INamingStrategy namingStrategy)
 {
     var auditTableName = namingStrategy.GetAuditTableName(dataTable);
       var auditTable = new Table(auditTableName);
       CopyColumns(dataTable, auditTable);
       CopyPrimaryKey(dataTable, auditTable);
       return auditTable;
 }
Example #18
0
 public TriggerAuditing(Configuration configuration,
     INamingStrategy namingStrategy,
     IAuditColumnSource columnSource,
     Func<Table, bool> tableFilter)
 {
     _configuration = configuration;
       _namingStrategy = namingStrategy;
       _columnSource = columnSource;
       _tableFilter = tableFilter;
 }
        public virtual void Apply(ModelBuilder modelBuilder, INamingStrategy namingStrategy)
        {
            modelBuilder.ApplyConfiguration(this);

            if (namingStrategy != null)
            {
                var builder = modelBuilder.Entity <TEntity>();
                this.ApplyNamingStrategy(builder, namingStrategy);
            }
        }
Example #20
0
        protected virtual Table BuildAuditTable(Table dataTable,
                                                INamingStrategy namingStrategy)
        {
            var auditTableName = namingStrategy.GetAuditTableName(dataTable);
            var auditTable     = new Table(auditTableName);

            CopyColumns(dataTable, auditTable);
            CopyPrimaryKey(dataTable, auditTable);
            return(auditTable);
        }
Example #21
0
 public TriggerAuditing(Configuration configuration,
                        INamingStrategy namingStrategy,
                        IAuditColumnSource columnSource,
                        Func <Table, bool> tableFilter)
 {
     _configuration  = configuration;
     _namingStrategy = namingStrategy;
     _columnSource   = columnSource;
     _tableFilter    = tableFilter;
 }
Example #22
0
        private void CheckAndInclude(IDependencyReport report, TypeReference type, INamingStrategy strategy)
        {
            if (type?.IsInStandardLib() ?? true)
            {
                return;
            }
            var typeDef = type.Resolve();

            Managed.InspectType(report, type, typeDef, null, strategy);
        }
Example #23
0
        private XamlFragment AddNameToFragment(INamingStrategy namingStrategy, XamlFragment xamlFragment)
        {
            var namedXamlFragment = namingStrategy.AddName(xamlFragment);

            if (namedXamlFragment != xamlFragment)
            {
                Console.Write(namedXamlFragment + Environment.NewLine);
            }

            return(namedXamlFragment);
        }
Example #24
0
 public DefaultPublisher(
     IConnection connection,
     INamingStrategy namingStrategy,
     IDispatcher dispatcher,
     BusConfiguration configuration)
 {
     _connection     = connection;
     _namingStrategy = namingStrategy;
     _dispatcher     = dispatcher;
     _configuration  = configuration;
 }
Example #25
0
   public AuditTrigger(Table dataTable, AuditTable auditTable,
       INamingStrategy namingStrategy, TriggerActions action)
       : base(namingStrategy.GetTriggerName(dataTable, action),
 dataTable.GetQuotedName(),
 action)
   {
       _auditTable = auditTable;
         _dataColumnNames = (
       from column in dataTable.ColumnIterator
       select column.GetQuotedName()
       ).ToArray();
   }
Example #26
0
 public AuditTrigger(Table dataTable, AuditTable auditTable,
                     INamingStrategy namingStrategy, TriggerActions action)
     : base(
         namingStrategy.GetTriggerName(dataTable, action),
         dataTable.GetQuotedName(),
         action)
 {
     _auditTable      = auditTable;
     _dataColumnNames = (
         from column in dataTable.ColumnIterator
         select column.GetQuotedName()
         ).ToArray();
 }
Example #27
0
        private void RewriteTypeNames(ITypeCollector collot, INamingStrategy nameStrategy, IDependencyReport report)
        {
            var          mappings = collot.Types.ToDictionary(k => k, nameStrategy.GetName);
            var          myTypes  = report.Units.Values.SelectMany(v => v.Types.Values).ToArray();
            ICodePatcher patcher  = new CodePatcher(mappings);

            foreach (var map in mappings)
            {
                var typeName = map.Value;
                var type     = myTypes.Single(t => $"{t.Namespace}.{t.Name}" == typeName);
                patcher.Patch(type);
            }
        }
Example #28
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="classes"></param>
 /// <param name="collections"></param>
 /// <param name="tables"></param>
 /// <param name="queries"></param>
 /// <param name="sqlqueries"></param>
 /// <param name="imports"></param>
 /// <param name="caches"></param>
 /// <param name="secondPasses"></param>
 /// <param name="propertyReferences"></param>
 /// <param name="namingStrategy"></param>
 internal Mappings(IDictionary classes, IDictionary collections, IDictionary tables, IDictionary queries, IDictionary sqlqueries, IDictionary imports, IDictionary caches, IList secondPasses, IList propertyReferences, INamingStrategy namingStrategy)
 {
     this.classes            = classes;
     this.collections        = collections;
     this.queries            = queries;
     this.sqlqueries         = sqlqueries;
     this.tables             = tables;
     this.imports            = imports;
     this.caches             = caches;
     this.secondPasses       = secondPasses;
     this.propertyReferences = propertyReferences;
     this.namingStrategy     = namingStrategy;
 }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="classes"></param>
		/// <param name="collections"></param>
		/// <param name="tables"></param>
		/// <param name="queries"></param>
		/// <param name="sqlqueries"></param>
		/// <param name="imports"></param>
		/// <param name="caches"></param>
		/// <param name="secondPasses"></param>
		/// <param name="propertyReferences"></param>
		/// <param name="namingStrategy"></param>
		internal Mappings( IDictionary classes, IDictionary collections, IDictionary tables, IDictionary queries, IDictionary sqlqueries, IDictionary imports, IDictionary caches, IList secondPasses, IList propertyReferences, INamingStrategy namingStrategy )
		{
			this.classes = classes;
			this.collections = collections;
			this.queries = queries;
			this.sqlqueries = sqlqueries;
			this.tables = tables;
			this.imports = imports;
			this.caches = caches;
			this.secondPasses = secondPasses;
			this.propertyReferences = propertyReferences;
			this.namingStrategy = namingStrategy;
		}
Example #30
0
 protected internal Mappings(
     IDictionary <string, PersistentClass> classes,
     IDictionary <string, Mapping.Collection> collections,
     IDictionary <string, Table> tables,
     IDictionary <string, NamedQueryDefinition> queries,
     IDictionary <string, NamedSQLQueryDefinition> sqlqueries,
     IDictionary <string, ResultSetMappingDefinition> resultSetMappings,
     IDictionary <string, string> imports,
     IList <SecondPassCommand> secondPasses,
     Queue <FilterSecondPassArgs> filtersSecondPasses,
     IList <PropertyReference> propertyReferences,
     INamingStrategy namingStrategy,
     IDictionary <string, TypeDef> typeDefs,
     IDictionary <string, FilterDefinition> filterDefinitions,
     ISet <ExtendsQueueEntry> extendsQueue,
     IList <IAuxiliaryDatabaseObject> auxiliaryDatabaseObjects,
     IDictionary <string, TableDescription> tableNameBinding,
     IDictionary <Table, ColumnNames> columnNameBindingPerTable,
     string defaultAssembly,
     string defaultNamespace,
     string defaultCatalog,
     string defaultSchema,
     string preferPooledValuesLo,
     Dialect.Dialect dialect) :
     this(
         classes,
         collections,
         tables,
         queries,
         sqlqueries,
         resultSetMappings,
         imports,
         secondPasses,
         filtersSecondPasses,
         propertyReferences,
         namingStrategy,
         typeDefs,
         filterDefinitions,
         extendsQueue,
         auxiliaryDatabaseObjects,
         tableNameBinding,
         columnNameBindingPerTable,
         defaultAssembly,
         defaultNamespace,
         defaultCatalog,
         defaultSchema,
         preferPooledValuesLo)
 {
     LazyDialect = new Lazy <Dialect.Dialect>(() => dialect);
 }
Example #31
0
 protected internal Mappings(
     IDictionary <string, PersistentClass> classes,
     IDictionary <string, Mapping.Collection> collections,
     IDictionary <string, Table> tables,
     IDictionary <string, NamedQueryDefinition> queries,
     IDictionary <string, NamedSQLQueryDefinition> sqlqueries,
     IDictionary <string, ResultSetMappingDefinition> resultSetMappings,
     IDictionary <string, string> imports,
     IList <SecondPassCommand> secondPasses,
     Queue <FilterSecondPassArgs> filtersSecondPasses,
     IList <PropertyReference> propertyReferences,
     INamingStrategy namingStrategy,
     IDictionary <string, TypeDef> typeDefs,
     IDictionary <string, FilterDefinition> filterDefinitions,
     ISet <ExtendsQueueEntry> extendsQueue,
     IList <IAuxiliaryDatabaseObject> auxiliaryDatabaseObjects,
     IDictionary <string, TableDescription> tableNameBinding,
     IDictionary <Table, ColumnNames> columnNameBindingPerTable,
     string defaultAssembly,
     string defaultNamespace,
     string defaultCatalog,
     string defaultSchema,
     string preferPooledValuesLo,
     Dialect.Dialect dialect)
 {
     this.classes                   = classes;
     this.collections               = collections;
     this.queries                   = queries;
     this.sqlqueries                = sqlqueries;
     this.resultSetMappings         = resultSetMappings;
     this.tables                    = tables;
     this.imports                   = imports;
     this.secondPasses              = secondPasses;
     this.propertyReferences        = propertyReferences;
     this.namingStrategy            = namingStrategy;
     this.typeDefs                  = typeDefs;
     this.filterDefinitions         = filterDefinitions;
     this.extendsQueue              = extendsQueue;
     this.auxiliaryDatabaseObjects  = auxiliaryDatabaseObjects;
     this.tableNameBinding          = tableNameBinding;
     this.columnNameBindingPerTable = columnNameBindingPerTable;
     this.defaultAssembly           = defaultAssembly;
     this.defaultNamespace          = defaultNamespace;
     DefaultCatalog                 = defaultCatalog;
     DefaultSchema                  = defaultSchema;
     PreferPooledValuesLo           = preferPooledValuesLo;
     this.dialect                   = dialect;
     this.filtersSecondPasses       = filtersSecondPasses;
 }
        /// <summary>Gets foreign key name.</summary>
        /// <param name="modelDef">      The model definition.</param>
        /// <param name="refModelDef">   The reference model definition.</param>
        /// <param name="namingStrategy">The naming strategy.</param>
        /// <param name="fieldDef">      The field definition.</param>
        /// <returns>The foreign key name.</returns>
        public string GetForeignKeyName(ModelDefinition modelDef, ModelDefinition refModelDef,
                                        INamingStrategy namingStrategy, FieldDefinition fieldDef)
        {
            if (!string.IsNullOrEmpty(ForeignKeyName))
            {
                return(ForeignKeyName);
            }

            var modelName = modelDef.IsInSchema
                ? modelDef.Schema + "_" + namingStrategy.GetTableName(modelDef.ModelName)
                : namingStrategy.GetTableName(modelDef.ModelName);

            var refModelName = refModelDef.IsInSchema
                ? refModelDef.Schema + "_" + namingStrategy.GetTableName(refModelDef.ModelName)
                : namingStrategy.GetTableName(refModelDef.ModelName);

            return($"FK_{modelName}_{refModelName}_{fieldDef.FieldName}");
        }
Example #33
0
        public override void OnCreated(IThreading threading)
        {
            Console.Message("loading auto color monitor");
            Console.Message("initializing colors");
            RandomColor.Initialize();

            Console.Message("loading current config");
            var config = Configuration.LoadConfig();

            _colorStrategy  = SetColorStrategy(config.ColorStrategy);
            _namingStrategy = SetNamingStrategy(config.NamingStrategy);
            _usedColors     = new List <Color32>();

            Console.Message("Found color strategy of " + config.ColorStrategy);
            Console.Message("Found naming strategy of " + config.NamingStrategy);

            _initialized = true;
            base.OnCreated(threading);
        }
Example #34
0
        public static ModelBuilder ApplyBpmtkModelConfigurations(this ModelBuilder modelBuilder,
                                                                 INamingStrategy namingStrategy)
        {
            if (namingStrategy == null)
            {
                throw new ArgumentNullException(nameof(namingStrategy));
            }

            var configurations = new IEntityTypeConfiguration[]
            {
                new ByteArrayConfiguration(),
                new PackageConfiguration(),
                new PackageItemConfiguration(),
                new HistoricModelConfiguration(),
                new HistoricPackageItemConfiguration(),
                new IdentityLinkConfiguration(),
                new UserConfiguration(),
                new GroupConfiguration(),
                new UserGroupConfiguration(),
                new DeploymentConfiguration(),
                new ProcessDefinitionConfiguration(),
                new ProcessInstanceConfiguration(),
                new TokenConfiguration(),
                new ActivityInstanceConfiguration(),
                new ActivityVariableConfiguration(),
                new VariableConfiguration(),
                new TaskConfiguration(),
                new ScheduledJobConfiguration(),
                new EventSubscriptionConfiguration(),
                new CommentConfiguration()
            };

            foreach (var configuration in configurations)
            {
                configuration.Apply(modelBuilder, namingStrategy);
            }

            return(modelBuilder);
        }
Example #35
0
 internal Mappings(
     IDictionary<string, PersistentClass> classes,
     IDictionary<string, Mapping.Collection> collections,
     IDictionary<string, Table> tables,
     IDictionary<string, NamedQueryDefinition> queries,
     IDictionary<string, NamedSQLQueryDefinition> sqlqueries,
     IDictionary<string, ResultSetMappingDefinition> resultSetMappings,
     IDictionary<string, string> imports,
     IList<SecondPassCommand> secondPasses,
     IList<PropertyReference> propertyReferences,
     INamingStrategy namingStrategy,
     IDictionary<string, TypeDef> typeDefs,
     IDictionary<string, FilterDefinition> filterDefinitions,
     ISet<ExtendsQueueEntry> extendsQueue,
     IList<IAuxiliaryDatabaseObject> auxiliaryDatabaseObjects,
     IDictionary<string, TableDescription> tableNameBinding,
     IDictionary<Table, ColumnNames> columnNameBindingPerTable,
     string defaultAssembly,
     string defaultNamespace)
 {
     this.classes = classes;
     this.collections = collections;
     this.queries = queries;
     this.sqlqueries = sqlqueries;
     this.resultSetMappings = resultSetMappings;
     this.tables = tables;
     this.imports = imports;
     this.secondPasses = secondPasses;
     this.propertyReferences = propertyReferences;
     this.namingStrategy = namingStrategy;
     this.typeDefs = typeDefs;
     this.filterDefinitions = filterDefinitions;
     this.extendsQueue = extendsQueue;
     this.auxiliaryDatabaseObjects = auxiliaryDatabaseObjects;
     this.tableNameBinding = tableNameBinding;
     this.columnNameBindingPerTable = columnNameBindingPerTable;
     this.defaultAssembly = defaultAssembly;
     this.defaultNamespace = defaultNamespace;
 }
Example #36
0
        public override void OnCreated(IThreading threading)
        {
            Logger.Message("===============================");
            Logger.Message("Initializing auto color monitor");
            Logger.Message("Initializing colors");
            GenericNames.Initialize();

            Logger.Message("Loading current config");
            _config         = Configuration.Instance;
            _colorStrategy  = SetColorStrategy(_config.ColorStrategy);
            _namingStrategy = SetNamingStrategy(_config.NamingStrategy);
            _usedColors     = new NullUsedColors();

            Logger.Message("Found color strategy of " + _config.ColorStrategy);
            Logger.Message("Found naming strategy of " + _config.NamingStrategy);

            _initialized = true;
            Instance     = this;

            Logger.Message("done creating");
            base.OnCreated(threading);
        }
        public override void OnCreated(IThreading threading)
        {
            logger.Message("===============================");
            logger.Message("Initializing auto color monitor");
            logger.Message("Initializing colors");
            RandomColor.Initialize();
            CategorisedColor.Initialize();
            GenericNames.Initialize();

            logger.Message("Loading current config");
            _config = Configuration.Instance;
            _colorStrategy = SetColorStrategy(_config.ColorStrategy);
            _namingStrategy = SetNamingStrategy(_config.NamingStrategy);
            _usedColors = new List<Color32>();

            logger.Message("Found color strategy of " + _config.ColorStrategy);
            logger.Message("Found naming strategy of " + _config.NamingStrategy);

            _initialized = true;

            logger.Message("done creating");
            base.OnCreated(threading);
        }
Example #38
0
        // TODO: make this whole thing a coroutine?
        public override void OnUpdate(float realTimeDelta, float simulationTimeDelta)
        {
            TransportManager  theTransportManager;
            SimulationManager theSimulationManager;

            TransportLine[] lines;

            try
            {
                //Digest changes
                if (_config.UndigestedChanges)
                {
                    Logger.Message("Applying undigested changes");
                    _colorStrategy            = SetColorStrategy(_config.ColorStrategy);
                    _namingStrategy           = SetNamingStrategy(_config.NamingStrategy);
                    _config.UndigestedChanges = false;
                }

                if (_initialized == false)
                {
                    return;
                }

                // try and limit how often we are scanning for lines. this ain't that important
                if (_nextUpdateTime >= DateTimeOffset.Now)
                {
                    return;
                }

                if (!Singleton <TransportManager> .exists || !Singleton <SimulationManager> .exists)
                {
                    return;
                }

                theTransportManager  = Singleton <TransportManager> .instance;
                theSimulationManager = Singleton <SimulationManager> .instance;
                lines = theTransportManager.m_lines.m_buffer;
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                return;
            }

            if (theSimulationManager.SimulationPaused)
            {
                return;
            }

            var locked = false;

            try
            {
                _nextUpdateTime = DateTimeOffset.Now.AddSeconds(Constants.UpdateIntervalSeconds);

                locked = Monitor.TryEnter(lines, SimulationManager.SYNCHRONIZE_TIMEOUT);

                if (!locked)
                {
                    return;
                }

                _usedColors = UsedColors.FromLines(lines);

                for (ushort i = 0; i < lines.Length - 1; i++)
                {
                    ProcessLine(i, lines[i], false, theSimulationManager, theTransportManager);
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            finally
            {
                if (locked)
                {
                    Monitor.Exit(lines);
                }
            }
        }
Example #39
0
        private void Process(string name, IEnumerable <TypeDefinition> types,
                             IMetadataTokenProvider invRef, IDependencyReport report)
        {
            var             units           = report.Units;
            var             nativeTypeName  = Capitalize(Path.GetFileNameWithoutExtension(name));
            var             collot          = new TypeCollector();
            INamingStrategy nameArgStrategy = null;

            foreach (var meth in types.SelectMany(t => t.Methods))
            {
                PInvokeInfo pinv;
                if (!meth.HasPInvokeInfo || invRef != (pinv = meth.PInvokeInfo).Module)
                {
                    continue;
                }
                var   nativeMethName = pinv.EntryPoint;
                var   retType        = Deobfuscate(meth.ReturnType.ToString());
                var   parms          = Deobfuscate(GetParamStr(meth));
                var   key            = $"{nativeMethName} {retType} {parms}";
                IUnit unit;
                if (!units.TryGetValue(name, out unit))
                {
                    units[name] = unit = new AssemblyUnit(nativeTypeName, new Version("0.0.0.0"));
                }
                IType ptype;
                if (!unit.Types.TryGetValue(nativeTypeName, out ptype))
                {
                    unit.Types[nativeTypeName] = ptype = new AssemblyType(nativeTypeName, TypeKind.Class);
                }
                nameArgStrategy = new NativeArgNameStrategy(ptype);
                collot.Collect(meth);
                var newRetType  = nameArgStrategy.GetName(meth.ReturnType);
                var methRetType = Deobfuscate(meth.ReturnType.FullName);
                if (newRetType != null)
                {
                    methRetType = newRetType;
                }
                IMethod pmethod;
                if (!ptype.Methods.TryGetValue(key, out pmethod))
                {
                    ptype.Methods[key] = pmethod = new AssemblyMethod(nativeMethName, methRetType);
                }
                pmethod.Parameters.Clear();
                foreach (var parm in meth.Parameters)
                {
                    var newParmType = nameArgStrategy.GetName(parm.ParameterType);
                    var mparmType   = Deobfuscate(parm.ParameterType.FullName);
                    if (newParmType != null)
                    {
                        mparmType = newParmType;
                    }
                    var mparm = new MethodParameter(parm.Name, mparmType);
                    pmethod.Parameters.Add(mparm);
                }
                const StringSplitOptions sso = StringSplitOptions.None;
                var text = $"{meth}".Split(new[] { $"{meth.ReturnType}" }, 2, sso).Last().Trim();
                pmethod.Aliases.Add(Deobfuscate(text));
            }
            if (nameArgStrategy == null)
            {
                return;
            }
            foreach (var type in collot.Types)
            {
                CheckAndInclude(report, type, nameArgStrategy);
            }
            RewriteTypeNames(collot, nameArgStrategy, report);
        }
        /// <summary>
        /// Generates a class proxy.
        /// This is a class that defines stubs for all actions, references to repositories and so forth and calls into the users own implementation upon invokation.
        /// </summary>
        /// <param name="classTemplate">The class template that should be used to generate the class proxy.</param>
        /// <param name="namingStrategy">The naming strategy that should be used to generate names for all the entities the class uses.</param>
        /// <param name="classDirectory">Into which subdirectory the files should be placed.</param>
        /// <param name="addDependencies">Should dependencies be placed in the class proxy? If true, the class will contain references and injectors to all repositories in the extension.</param>
        /// <exception cref="GeneratorException">Implementation does not exist.</exception>
        public void GenerateClassProxy( IClassTemplate classTemplate, INamingStrategy namingStrategy, string classDirectory, bool addDependencies )
        {
            string className = namingStrategy.GetExtbaseClassName( Subject, classTemplate );
              Log.InfoFormat( "Generating class '{0}'...", className );

              #region Generate Methods
              StringBuilder methods = new StringBuilder();
              const string methodTemplate = "/**\n" +
                                    "{_phpDoc}" +
                                    "*/\n" +
                                    "public function {_methodName}{_methodSuffix}({_parameters}) {{ return $this->getImplementation()->{_methodName}{_methodSuffix}({_callParameters}); }}\n";

              foreach( Action method in classTemplate.Actions ) {
            // Start building up the PHPDoc for this action
            string phpDoc = string.Empty;
            foreach( string requirement in method.Requirements ) {
              string typeName = "mixed";
              // See if the name of the requirement matches the name of a defined model,
              // if so, we assume the user wants to reference that model.
              DataModel requiredModel = Subject.Models.SingleOrDefault( m => m.Name.ToLower() == requirement );
              if( requiredModel != null ) {
            typeName = NameHelper.GetExtbaseDomainModelClassName( Subject, requiredModel );
            Log.InfoFormat(
              "Assuming requirement '{0}' for method '{1}:{2}' to be of type '{3}'.", requirement, classTemplate.Name,
              method.Name, typeName );
              }
              phpDoc = phpDoc + ( "* @param " + typeName + " $" + requirement + "\n" );
            }

            // Prefix each parameter with a $ and join them together with , in between.
            StringBuilder parameters = new StringBuilder();
            StringBuilder callParameters = new StringBuilder();
            foreach( string requirement in method.Requirements ) {
              parameters.Append( ( Regex.Replace( requirement, @"(?<name>[\w][^ ]+)$", @"$$${name}" ) + ( ( requirement != method.Requirements.Last() ) ? "," : string.Empty ) ) );
              callParameters.Append( "$" + ( Regex.Match( requirement, @"(?<name>[\w][^ ]+)$" ).Groups[ "name" ].ToString() + ( ( requirement != method.Requirements.Last() ) ? "," : string.Empty ) ) );
            }

            var methodData = new { _phpDoc = phpDoc, _methodSuffix = namingStrategy.MethodSuffix, _methodName = method.Name, _parameters = parameters, _callParameters = callParameters };

            methods.Append( methodTemplate.FormatSmart( methodData ) );
              }
              #endregion

              #region Handle External Implementations
              bool isExternallyImplemented   = false;
              string implementationClassname = string.Empty;
              string implementationFilename  = string.Empty;
              if( !string.IsNullOrEmpty( classTemplate.Implementation ) ) {
            isExternallyImplemented = true;
            implementationClassname = namingStrategy.GetExtbaseImplementationClassName( Subject, classTemplate );
            implementationFilename  = namingStrategy.GetExtbaseImplementationFileName( Subject, classTemplate );
              }

              if( isExternallyImplemented ) {
            if( !File.Exists( classTemplate.Implementation ) ) {
              throw new GeneratorException(
            string.Format( "Implementation '{0}' for '{1}' does not exist.", classTemplate.Implementation, classTemplate.Name ),
            classTemplate.SourceFragment.SourceDocument );
            }
            Log.InfoFormat( "Merging implementation '{0}'...", classTemplate.Implementation );
            string serviceImplementationContent = File.ReadAllText( classTemplate.Implementation );
            if( !Regex.IsMatch( serviceImplementationContent, String.Format( "class {0} ?({{|extends|implements)", implementationClassname ) ) ) {
              Log.WarnFormat( "The class name of your implementation for '{1}' MUST be '{0}'!", implementationClassname, classTemplate.Name );
            }
            WriteFile( classDirectory + implementationFilename, serviceImplementationContent, DateTime.UtcNow );

              } else {
            if( classTemplate.Actions.Count > 0 ) {
              Log.WarnFormat(
            "Proxy '{0}' defines actions, but has no implementation provided. If any of these actions is invoked by TYPO3, a PHP error will be generated!",
            classTemplate.Name );
            }
              }
              #endregion

              #region Generate Properties
              StringBuilder propertiesList = new StringBuilder();
              if( Subject.Models != null && addDependencies ) {
            foreach( DataModel dataModel in Subject.Models ) {
              const string memberTemplate = "/**\n" +
                                        "* {0}Repository\n" +
                                        "* @var {1}\n" +
                                        "*/\n" +
                                        "protected ${0}Repository;\n";

              // Check if the repository is internally implemented.
              // An example for an internally implemented repository would be Tx_Extbase_Domain_Repository_FrontendUserRepository
              Repository repository = Subject.Repositories.SingleOrDefault( r => r.TargetModelName == dataModel.Name );
              if( null != repository && PurelyWrapsInternalType( repository ) ) {
            propertiesList.Append(
              String.Format(
                memberTemplate, dataModel.Name, repository.InternalType ) );

              } else {
            propertiesList.Append(
              String.Format(
                memberTemplate, dataModel.Name,
                NameHelper.GetExtbaseDomainModelRepositoryClassName( Subject, dataModel ) ) );
              }

              const string injectorTemplate =
            "/**\n" +
            "* inject{0}Repository\n" +
            "* @param {1} ${2}Repository\n" +
            "*/\n" +
            "public function inject{0}Repository({1} ${2}Repository) {{\n" +
            "  $this->{2}Repository = ${2}Repository;\n" +
            "}}\n";

              // Check again if the repository is internally implemented.
              // An example for an inernally implemented repository would be Tx_Extbase_Domain_Repository_FrontendUserRepository
              string injector = string.Empty;
              if( null != repository && PurelyWrapsInternalType( repository ) ) {
            injector = String.Format(
              injectorTemplate, NameHelper.UpperCamelCase( dataModel.Name ), repository.InternalType, dataModel.Name );

              } else {
            injector = String.Format(
              injectorTemplate, NameHelper.UpperCamelCase( dataModel.Name ),
              NameHelper.GetExtbaseDomainModelRepositoryClassName( Subject, dataModel ), dataModel.Name );
              }

              propertiesList.Append( injector );
            }
              }
              #endregion

              string implementationTemplate = "private $implementation;" +
                                      "private function getImplementation() {{" +
                                      "  if( null == $this->implementation ) {{" +
                                      "    $this->implementation = new {_implClassname}($this);" +
                                      "  }}" +
                                      "  return $this->implementation;" +
                                      "}}" +
                                      "function __construct() {{" +
                                      ( ( !String.IsNullOrEmpty( namingStrategy.Extends ) ) ? "parent::__construct();" : string.Empty ) +
                                      "}}\n";

              string serviceImplementation = implementationTemplate.FormatSmart(
              new {
                _implClassname = implementationClassname
              } );

              const string template = "class {_className} {_extends} {_implements} {{" +
                              "{_properties}" +
                              "{_actions}" +
                              "}}" +
                              "{_requireImplementation}";

              string serviceResult = template.FormatSmart(
              new {
                _className             = namingStrategy.GetExtbaseClassName( Subject, classTemplate ),
                _extends               = namingStrategy.Extends,
                _implements            = namingStrategy.Implements,
                _properties            = (( isExternallyImplemented ) ? serviceImplementation : string.Empty) + propertiesList,
                _actions               = methods.ToString(),
                _requireImplementation = ( isExternallyImplemented ) ? string.Format( "require_once('{0}');", implementationFilename ) : string.Empty
              } );

              WritePhpFile( Path.Combine( classDirectory, namingStrategy.GetExtbaseFileName( Subject, classTemplate ) ), serviceResult, DateTime.UtcNow );
        }
Example #41
0
 public DtoGenerator(INamingStrategy naming)
 {
     _naming = naming;
 }
Example #42
0
            private Column CreateColumn(MemberInfo mi, INamingStrategy namingStrategy)
            {
                if (ReflectHelper.HasAttribute<IgnoreAttribute>(mi))
                    return null;

                ColumnAttribute colAttr = ReflectHelper.GetAttribute<ColumnAttribute>(mi);
                Column column = new Column();

                column.ColumnName = (colAttr == null || String.IsNullOrEmpty(colAttr.Name)) ? namingStrategy.GetColumnName(mi.Name) : colAttr.Name;
                if (colAttr != null)
                {
                    if (colAttr.DbType != DbType.Empty)
                        column.DbType = colAttr.DbType;
                    column.Updatable = colAttr.Updatable;
                }

                if (ReflectHelper.HasAttribute<PrimaryKeyAttribute>(mi))
                {
                    if (PrimaryKey == null)
                        PrimaryKey = new PrimaryKey();
                    PrimaryKey.AddColumn(column);
                }

                return column;
            }
 public void SetUp()
 {
     PreviousNamingStrategy = OrmLiteConfig.DialectProvider.NamingStrategy;
 }
 public TemporaryNamingStrategy(INamingStrategy temporary)
 {
     _dialectProvider = OrmLiteConfig.DialectProvider;
     _previous = _dialectProvider.NamingStrategy;
     _dialectProvider.NamingStrategy = temporary;
 }
        //private readonly ReflectionManager reflectionManager;

           public ExtendedMappings(IDictionary<string, PersistentClass> classes,
                                IDictionary<string, Mapping.Collection> collections,
                                IDictionary<string, Table> tables,
                                IDictionary<string, NamedQueryDefinition> queries,
                                IDictionary<string, NamedSQLQueryDefinition> sqlqueries,
                                IDictionary<string, ResultSetMappingDefinition> resultSetMappings,
                                ISet<string> defaultNamedQueryNames,
                                ISet<string> defaultNamedNativeQueryNames,
                                ISet<string> defaultSqlResulSetMappingNames,
                                ISet<string> defaultNamedGenerators,
                                IDictionary<string, string> imports, 
                                IList<SecondPassCommand> secondPasses,
                                IList<PropertyReference> propertyReferences,
                                INamingStrategy namingStrategy,
                                IDictionary<string, TypeDef> typeDefs,
                                IDictionary<string, FilterDefinition> filterDefinitions,
                                IDictionary<string, IdGenerator> namedGenerators,
                                IDictionary<string, IDictionary<string, Join>> joins,
                                IDictionary<string, AnnotatedClassType> classTypes,
                                ISet<ExtendsQueueEntry> extendsQueue,
                                IDictionary<string, TableDescription> tableNameBinding,
                                IDictionary<Table, ColumnNames> columnNameBindingPerTable,
                                IList<IAuxiliaryDatabaseObject> auxiliaryDatabaseObjects,
                                IDictionary<string,Annotations.Properties> generatorTables,
                                IDictionary<Table, List<string[]>> tableUniqueConstraints,
                                IDictionary<string, string> mappedByResolver,
                                IDictionary<string, string> propertyRefResolver,
                                IDictionary<string, AnyMetaDefAttribute> anyMetaDefs,
                                string defaultAssembly, 
                                string defaultNamespace,
                                Dialect.Dialect dialect) :
                                    base(classes,
                                         collections,
                                         tables,
                                         queries,
                                         sqlqueries,
                                         resultSetMappings,
                                         imports,
                                         secondPasses,
                                         propertyReferences,
                                         namingStrategy,
                                         typeDefs,
                                         filterDefinitions,
                                         extendsQueue,
                                         auxiliaryDatabaseObjects,
                                         tableNameBinding,
                                         columnNameBindingPerTable,
                                         defaultAssembly,
                                         defaultNamespace,
                                         dialect)
        {
            this.namedGenerators = namedGenerators;
            this.joins = joins;
            this.classTypes = classTypes;
            this.tableUniqueConstraints = tableUniqueConstraints;
            MappedByResolver = mappedByResolver;
            this.propertyRefResolver = propertyRefResolver;
            this.defaultNamedQueryNames = defaultNamedQueryNames;
            this.defaultNamedNativeQueryNames = defaultNamedNativeQueryNames;
            this.defaultSqlResulSetMappingNames = defaultSqlResulSetMappingNames;
            this.defaultNamedGenerators = defaultNamedGenerators;
            this.anyMetaDefs = anyMetaDefs;
        }
 private static string GetFullName(Table table, INamingStrategy namingStrategy)
 {
     return(string.Join(".", new [] { namingStrategy.TableName(table.Schema ?? "public"), namingStrategy.TableName(table.Name.TrimStart('`').TrimEnd('`')) }
                        .Where(x => !string.IsNullOrEmpty(x))));
 }
		public CustomNamingStrategy(INamingStrategy namingStrategy)
		{
			this.namingStrategy = namingStrategy ?? DefaultNamingStrategy.Instance;
		}
        public string GetForeignKeyName(ModelDefinition modelDef, ModelDefinition refModelDef, INamingStrategy NamingStrategy, FieldDefinition fieldDef)
        {
            if (ForeignKeyName.IsNullOrEmpty())
            {
                var modelName = modelDef.IsInSchema
                    ? modelDef.Schema + "_" + NamingStrategy.GetTableName(modelDef.ModelName)
                    : NamingStrategy.GetTableName(modelDef.ModelName);

                var refModelName = refModelDef.IsInSchema
                    ? refModelDef.Schema + "_" + NamingStrategy.GetTableName(refModelDef.ModelName)
                    : NamingStrategy.GetTableName(refModelDef.ModelName);

                var fkName = string.Format("FK_{0}_{1}_{2}", modelName, refModelName, fieldDef.FieldName);
                return(NamingStrategy.ApplyNameRestrictions(fkName));
            }
            else
            {
                return(ForeignKeyName);
            }
        }
        public override void OnUpdate(float realTimeDelta, float simulationTimeDelta)
        {
            //Digest changes
            if (_config.UndigestedChanges == true) {
                logger.Message("Applying undigested changes");
                _colorStrategy = SetColorStrategy(_config.ColorStrategy);
                _namingStrategy = SetNamingStrategy(_config.NamingStrategy);
                _config.UndigestedChanges = false;
            }

            if (_initialized == false)
                return;

            // try and limit how often we are scanning for lines. this ain't that important
            if (_nextUpdateTime >= DateTimeOffset.Now)
                return;

            var theTransportManager = Singleton<TransportManager>.instance;
            var lines = theTransportManager.m_lines.m_buffer;

            try
            {
                _nextUpdateTime = DateTimeOffset.Now.AddSeconds(10);
                _usedColors = lines.Where(l => l.IsActive()).Select(l => l.m_color).ToList();

                for (ushort i = 0; i < theTransportManager.m_lines.m_buffer.Length - 1; i++)
                {
                    var transportLine = lines[i];
                    //logger.Message(string.Format("Starting on line {0}", i));

                    if (transportLine.m_flags == TransportLine.Flags.None)
                        continue;

                    if (!transportLine.Complete)
                        continue;

                    // only worry about fully created lines
                    if (!transportLine.IsActive() || transportLine.HasCustomName() || !transportLine.m_color.IsDefaultColor())
                        continue;

                    logger.Message(string.Format("Working on line {0}", i));

                    var instanceID = new InstanceID();
                    var lineName = theTransportManager.GetLineName(i);
                    var newName = _namingStrategy.GetName(transportLine);

                    if (!transportLine.HasCustomColor() || transportLine.m_color.IsDefaultColor())
                    {
                        var color = _colorStrategy.GetColor(transportLine, _usedColors);

                        logger.Message(string.Format("About to change line color to {0}", color));
                        transportLine.m_color = color;
                        transportLine.m_flags |= TransportLine.Flags.CustomColor;
                        theTransportManager.SetLineColor(i, color);

                        logger.Message(string.Format("Changed line color. '{0}' {1} -> {2}", lineName, theTransportManager.GetLineColor(i), color));
                    }

                    if (string.IsNullOrEmpty(newName) == false &&
                        transportLine.HasCustomName() == false) {
                        logger.Message(string.Format("About to rename line to {0}", newName));

                        transportLine.m_flags |= TransportLine.Flags.CustomName;
                        theTransportManager.SetLineName(i, newName);

                        logger.Message(string.Format("Renamed Line '{0}' -> '{1}'", lineName, newName));
                    }

                    logger.Message(string.Format("Line is now {0} and {1}",
                        theTransportManager.GetLineName(i),
                        theTransportManager.GetLineColor(i)));

                    lines[i] = transportLine;
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
            }
            finally
            {
                Monitor.Exit(Monitor.TryEnter(lines));
            }
        }
Example #50
0
 public PostgresNamingStrategy(INamingStrategy defaultNamingStrategy = null)
 {
     _defaultNamingStrategy = defaultNamingStrategy;
 }
Example #51
0
        public string GetForeignKeyName(ModelDefinition modelDef, ModelDefinition refModelDef, INamingStrategy NamingStrategy, FieldDefinition fieldDef)
        {
            if (ForeignKeyName.IsNullOrEmpty())
            {
                var modelName = modelDef.IsInSchema
                    ? modelDef.Schema + "_" + NamingStrategy.GetTableName(modelDef.ModelName)
                    : NamingStrategy.GetTableName(modelDef.ModelName);

                var refModelName = refModelDef.IsInSchema
                    ? refModelDef.Schema + "_" + NamingStrategy.GetTableName(refModelDef.ModelName)
                    : NamingStrategy.GetTableName(refModelDef.ModelName);

                var fkName = string.Format("FK_{0}_{1}_{2}", modelName, refModelName, fieldDef.FieldName);
                return NamingStrategy.ApplyNameRestrictions(fkName);
            }
            else { return ForeignKeyName; }
        }
Example #52
0
		protected internal Mappings(
			IDictionary<string, PersistentClass> classes,
			IDictionary<string, Mapping.Collection> collections,
			IDictionary<string, Table> tables,
			IDictionary<string, NamedQueryDefinition> queries,
			IDictionary<string, NamedSQLQueryDefinition> sqlqueries,
			IDictionary<string, ResultSetMappingDefinition> resultSetMappings,
			IDictionary<string, string> imports,
			IList<SecondPassCommand> secondPasses,
			Queue<FilterSecondPassArgs> filtersSecondPasses,
			IList<PropertyReference> propertyReferences,
			INamingStrategy namingStrategy,
			IDictionary<string, TypeDef> typeDefs,
			IDictionary<string, FilterDefinition> filterDefinitions,
			Iesi.Collections.Generic.ISet<ExtendsQueueEntry> extendsQueue,
			IList<IAuxiliaryDatabaseObject> auxiliaryDatabaseObjects,
			IDictionary<string, TableDescription> tableNameBinding,
			IDictionary<Table, ColumnNames> columnNameBindingPerTable,
			string defaultAssembly,
			string defaultNamespace,
			string defaultCatalog,
			string defaultSchema,
			string preferPooledValuesLo,
			Dialect.Dialect dialect)
		{
			this.classes = classes;
			this.collections = collections;
			this.queries = queries;
			this.sqlqueries = sqlqueries;
			this.resultSetMappings = resultSetMappings;
			this.tables = tables;
			this.imports = imports;
			this.secondPasses = secondPasses;
			this.propertyReferences = propertyReferences;
			this.namingStrategy = namingStrategy;
			this.typeDefs = typeDefs;
			this.filterDefinitions = filterDefinitions;
			this.extendsQueue = extendsQueue;
			this.auxiliaryDatabaseObjects = auxiliaryDatabaseObjects;
			this.tableNameBinding = tableNameBinding;
			this.columnNameBindingPerTable = columnNameBindingPerTable;
			this.defaultAssembly = defaultAssembly;
			this.defaultNamespace = defaultNamespace;
			DefaultCatalog = defaultCatalog;
			DefaultSchema = defaultSchema;
			PreferPooledValuesLo = preferPooledValuesLo;
			this.dialect = dialect;
			this.filtersSecondPasses = filtersSecondPasses;
		}
Example #53
0
        public string GetForeignKeyName(ModelDefinition modelDef, ModelDefinition refModelDef, INamingStrategy namingStrategy, FieldDefinition fieldDef)
        {
            if (ForeignKeyName.IsNullOrEmpty())
            {
                var modelName = modelDef.IsInSchema
                    ? $"{modelDef.Schema}_{namingStrategy.GetTableName(modelDef.ModelName)}"
                    : namingStrategy.GetTableName(modelDef.ModelName);

                var refModelName = refModelDef.IsInSchema
                    ? $"{refModelDef.Schema}_{namingStrategy.GetTableName(refModelDef.ModelName)}"
                    : namingStrategy.GetTableName(refModelDef.ModelName);

                var fkName = $"FK_{modelName}_{refModelName}_{fieldDef.FieldName}";
                return(namingStrategy.ApplyNameRestrictions(fkName));
            }
            return(ForeignKeyName);
        }
Example #54
0
            /// <summary>
            /// Initializes a mapping table.
            /// </summary>
            /// <param name="type">the type to map</param>
            /// <param name="namingStrategy">the naming strategy to apply</param>
            public Table(Type type, INamingStrategy namingStrategy)
            {
                String typeName = type.FullName;
                TableAttribute tableAttr = ReflectHelper.GetAttribute<TableAttribute>(type);

                Name = (tableAttr == null) ? namingStrategy.GetTableName(typeName) : tableAttr.Name;
                EntityType = type;
                _fields = ReflectHelper.GetSettableFields(type);
                _properties = DefaultTypeMap.GetSettableProps(type);

                foreach (PropertyInfo pi in _properties)
                {
                    Column column = CreateColumn(pi, namingStrategy);
                    if (column != null)
                    {
                        if (column.DbType == DbType.Empty)
                            column.DbType = LookupDbType(pi.PropertyType, pi.Name);
                        column.MemberInfo = new SimpleMemberMap(column.ColumnName, pi);
                        AddColumn(column);
                    }
                }

                foreach (FieldInfo fi in _fields)
                {
                    Column column = CreateColumn(fi, namingStrategy);
                    if (column != null)
                    {
                        if (column.DbType == DbType.Empty)
                            column.DbType = LookupDbType(fi.FieldType, fi.Name);
                        column.MemberInfo = new SimpleMemberMap(column.ColumnName, fi);
                        AddColumn(column);
                    }
                }

                if (PrimaryKey == null)
                {
                    Column idCol = FindColumnByFieldName("id");
                    if (idCol != null)
                    {
                        PrimaryKey = new PrimaryKey();
                        PrimaryKey.AddColumn(idCol);
                    }
                }
            }
		/// <summary>
		/// Set a custom naming strategy
		/// </summary>
		/// <param name="namingStrategy">the NamingStrategy to set</param>
		/// <returns></returns>
		public Configuration SetNamingStrategy( INamingStrategy namingStrategy )
		{
			this.namingStrategy = namingStrategy;
			return this;
		}
Example #56
0
 public Configuration SetNamingStrategy(INamingStrategy newNamingStrategy);