Exemple #1
0
        internal GenerationRules CreateGenerationRules()
        {
            var rules = new GenerationRules(SchemaConstants.MartenGeneratedNamespace)
            {
                TypeLoadMode = GeneratedCodeMode,

                GeneratedCodeOutputPath = GeneratedCodeOutputPath
                                          .AppendPath("Internal", "Generated"),
                ApplicationAssembly      = ApplicationAssembly,
                SourceCodeWritingEnabled = SourceCodeWritingEnabled
            };

            if (StoreName.IsNotEmpty() && StoreName != "Marten")
            {
                rules.GeneratedNamespace     += "." + StoreName;
                rules.GeneratedCodeOutputPath = Path.Combine(rules.GeneratedCodeOutputPath, StoreName);
            }

            rules.ReferenceAssembly(GetType().Assembly);
            rules.ReferenceAssembly(Assembly.GetEntryAssembly());

            return(rules);
        }