Example #1
0
        private static void UpdateRestfulClientProjects(IList <Aggregate> aggregates)
        {
            // ///////////////////////////////////////////////////////
            var javaRestDomainProjConfig = new ProjectConfiguration
            {
                DomainProjectEnabled = false,
                RestfulClientDomainProjectEnabled = false,
                DomainProjectNHibernateEnabled    = false,

                JavaDomainProjectEnabled = false,
                //JavaDomainMsbProjectFilePath = @"...",
                //JavaDomainProjectDirectoryPath = javaDomainProjDir,
                //JavaDomainProjectName = javaDomainProjName,
                //JavaDomainSubDirectoryPath = @"...",
                //JavaSrcGeneratedJavaSubDirectoryPath = @"src\generated\java",

                // ////////////////////////////////////////////////////////
                BoundedContextJavaPackageName             = "org.dddml.wms",
                JavaRestfulClientDomainMsbProjectFilePath = @"..\..\..\java\Dddml.Wms.JavaRestful.Client\Dddml.Wms.JavaRestful.Client.csproj",
                //JavaRestfulClientDomainProjectName = "Dddml.Wms.JavaRestful.Client",
                JavaRestfulClientDomainProjectEnabled = true,
                // ////////////////////////////////////////////////////////

                JavaDomainProjectHibernateEnabled = false,
                //DomainSubDirectoryPath = @"Generated\Domain",
            };

            var javaRestDomainProjectGenerator = new DomainAggregateT4ScriptGenerator(javaRestDomainProjConfig);

            javaRestDomainProjectGenerator.IsMViewObjectDisabled = true;
            javaRestDomainProjectGenerator.CreateAggregatesDirectoriesAndScripts(aggregates);
            javaRestDomainProjectGenerator.CleanAggregatesDirectoriesAndScripts(aggregates);
        }
Example #2
0
        private static void UpdateHibernateProjects(IList <Aggregate> aggregates)
        {
            var hibernateProjectConfig = new ProjectConfiguration
            {
                DomainProjectEnabled              = false,
                DomainProjectNHibernateEnabled    = false,
                RestfulClientDomainProjectEnabled = false,

                JavaDomainProjectEnabled = false,
                JavaRestfulClientDomainProjectEnabled = false,
                JavaDomainProjectHibernateEnabled     = false,

                // //////////////////////////////
                NHibernateProjectEnabled     = true,
                NHibernateMsbProjectFilePath = @"..\..\..\Dddml.Wms.Services\Dddml.Wms.Services.csproj",
                DomainSubDirectoryPath       = @"Generated\Domain",
                //T4GenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",
                T4GenerateAggregateDomainNHibernateScriptTemplateIncludeFile = @"..\..\..\..\LoadBoundedContext.tt",

                // //////////////////////////////
                JavaHibernateProjectEnabled     = true,
                JavaHibernateMsbProjectFilePath = @"..\..\..\java\Dddml.Wms.JavaServices\Dddml.Wms.JavaServices.csproj",
                JavaDomainSubDirectoryPath      = @"src\generated\java\org\dddml\wms\domain",
                //T4JavaGenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\LoadBoundedContext.tt",
                T4JavaGenerateAggregateDomainHibernateScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",
            };

            var hibernateProjectGenerator = new DomainAggregateT4ScriptGenerator(hibernateProjectConfig);

            hibernateProjectGenerator.IsMViewObjectDisabled = true;
            hibernateProjectGenerator.CreateAggregatesDirectoriesAndScripts(aggregates);
            hibernateProjectGenerator.CleanAggregatesDirectoriesAndScripts(aggregates);
        }
Example #3
0
        private static void UpdateDomainProjects(IList <Aggregate> aggregates)
        {
            // ////////////////////////////////////////////////
            var domainProjectConfig = new ProjectConfiguration
            {
                //RestfulClientDomainProjectFilePath = @"..\..\..\Dddml.Wms.HttpServices.RestfulClient\Dddml.Wms.HttpServices.RestfulClient.csproj",
                RestfulClientDomainProjectEnabled = false,
                //JavaRestfulClientDomainProjectFilePath = @"..\..\..\java\Dddml.Wms.JavaRestful.Client\Dddml.Wms.JavaRestful.Client.csproj",
                JavaRestfulClientDomainProjectEnabled = false,

                // ///////////////////////////////////////////
                DomainProjectEnabled     = true,
                DomainMsbProjectFilePath = @"..\..\..\Dddml.Wms.Common\Dddml.Wms.Common.csproj",
                //T4GenerateAggregateDomainNHibernateScriptTemplateIncludeFile = @"..\..\..\..\LoadBoundedContext.tt",
                DomainProjectNHibernateEnabled = false,
                DomainSubDirectoryPath         = @"Generated\Domain",
                T4GenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",

                // ///////////////////////////////////////////
                JavaDomainProjectEnabled     = true,
                JavaDomainMsbProjectFilePath = @"..\..\..\java\Dddml.Wms.JavaCommon\Dddml.Wms.JavaCommon.csproj",
                //T4JavaGenerateAggregateDomainHibernateScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",
                JavaDomainProjectHibernateEnabled = false,
                JavaDomainSubDirectoryPath        = @"src\generated\java\org\dddml\wms\domain",
                T4JavaGenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\LoadBoundedContext.tt",
            };

            var domainProjectGenerator = new DomainAggregateT4ScriptGenerator(domainProjectConfig);

            domainProjectGenerator.CreateAggregatesDirectoriesAndScripts(aggregates);
        }
Example #4
0
        static void Main(string[] args)
        {
            var domainProjectConfig = new ProjectConfiguration
            {
                //RestfulClientDomainProjectFilePath = @"..\..\..\Dddml.Wms.HttpServices.RestfulClient\Dddml.Wms.HttpServices.RestfulClient.csproj",
                RestfulClientDomainProjectEnabled = false,
                //JavaRestfulClientDomainProjectFilePath = @"..\..\..\Dddml.Wms.JavaRestfulClient\Dddml.Wms.JavaRestfulClient.csproj",
                JavaRestfulClientDomainProjectEnabled = false,

                // ///////////////////////////////////////////
                DomainProjectEnabled  = true,
                DomainProjectFilePath = @"..\..\..\Dddml.Wms.Common\Dddml.Wms.Common.csproj",
                //T4GenerateAggregateDomainNHibernateScriptTemplateIncludeFile = @"..\..\..\..\LoadBoundedContext.tt",
                DomainProjectNHibernateEnabled = false,
                DomainSubDirectoryPath         = @"Generated\Domain",
                T4GenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",

                // ///////////////////////////////////////////
                JavaDomainProjectEnabled  = true,
                JavaDomainProjectFilePath = @"..\..\..\Dddml.Wms.JavaCommon\Dddml.Wms.JavaCommon.csproj",
                //T4JavaGenerateAggregateDomainHibernateScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",
                JavaDomainProjectHibernateEnabled = false,
                JavaDomainSubDirectoryPath        = @"src\main\java\org\dddml\wms\domain",
                T4JavaGenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\LoadBoundedContext.tt",
            };

            var hibernateProjectConfig = new ProjectConfiguration
            {
                DomainProjectEnabled              = false,
                DomainProjectNHibernateEnabled    = false,
                RestfulClientDomainProjectEnabled = false,

                JavaDomainProjectEnabled = false,
                JavaRestfulClientDomainProjectEnabled = false,
                JavaDomainProjectHibernateEnabled     = false,

                // //////////////////////////////
                NHibernateProjectEnabled  = true,
                NHibernateProjectFilePath = @"..\..\..\Dddml.Wms.Services\Dddml.Wms.Services.csproj",
                DomainSubDirectoryPath    = @"Generated\Domain",
                //T4GenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",
                T4GenerateAggregateDomainNHibernateScriptTemplateIncludeFile = @"..\..\..\..\LoadBoundedContext.tt",

                // //////////////////////////////
                JavaHibernateProjectEnabled  = true,
                JavaHibernateProjectFilePath = @"..\..\..\Dddml.Wms.JavaServices\Dddml.Wms.JavaServices.csproj",
                JavaDomainSubDirectoryPath   = @"src\main\java\org\dddml\wms\domain",
                //T4JavaGenerateAggregateDomainScriptTemplateIncludeFile = @"..\..\LoadBoundedContext.tt",
                T4JavaGenerateAggregateDomainHibernateScriptTemplateIncludeFile = @"..\..\..\LoadBoundedContext.tt",
            };

            var aggregates = GetAggaregates();

            var domainProjectGenerator = new DomainAggregateT4ScriptGenerator(domainProjectConfig);

            domainProjectGenerator.CreateAggregatesDirectoriesAndScripts(aggregates);

            var hibernateProjectGenerator = new DomainAggregateT4ScriptGenerator(hibernateProjectConfig);

            hibernateProjectGenerator.CreateAggregatesDirectoriesAndScripts(aggregates);

            Console.WriteLine("Ok!");
            Console.ReadKey();
        }