static void GenerateDotNet(Files files, string designerDir, string outputDir, string specificationVersion)
        {
            var resourcePath = "ModelCompiler.Design";

            if (!String.IsNullOrEmpty(specificationVersion))
            {
                resourcePath = $"ModelCompiler.Design.{specificationVersion}";
            }

            ConstantsGenerator generator7 = new ConstantsGenerator(
                Language.DotNet,
                $"{designerDir}UA Attributes.xml",
                outputDir,
                files.NodeDictionaries,
                resourcePath);

            generator7.Generate(
                "Opc.Ua",
                "Attributes",
                $"{designerDir}UA Attributes.csv",
                false);

            ConstantsGenerator generator8 = new ConstantsGenerator(
                Language.DotNet,
                $"{designerDir}UA Status Codes.xml",
                outputDir,
                files.NodeDictionaries,
                resourcePath);

            generator8.Generate(
                "Opc.Ua",
                "StatusCodes",
                $"{designerDir}UA Status Codes.csv",
                false);

            ConstantsGenerator generator9 = new ConstantsGenerator(
                Language.CSV,
                $"{designerDir}UA Status Codes.xml",
                outputDir,
                files.NodeDictionaries,
                resourcePath);

            generator9.Generate(
                "Opc.Ua",
                "StatusCodes",
                $"{designerDir}UA Status Codes.csv",
                false);

            DotNetGenerator generator10 = new DotNetGenerator(
                $"{designerDir}UA Core Services.xml",
                outputDir,
                files.TypeDictionaries,
                resourcePath);

            generator10.Generate("Opc.Ua", "Core", true);
        }
        static void GenerateDotNet(Files files, string modelDir, string csvDir, string outputDir, string specificationVersion)
        {
            ConstantsGenerator generator7 = new ConstantsGenerator(
                Language.DotNet,
                $"{modelDir}UA Attributes.xml",
                outputDir,
                files.NodeDictionaries,
                null);

            generator7.Generate(
                "Opc.Ua",
                "Attributes",
                $"{csvDir}UA Attributes.csv",
                false);

            ConstantsGenerator generator8 = new ConstantsGenerator(
                Language.DotNet,
                $"{modelDir}UA Status Codes.xml",
                outputDir,
                files.NodeDictionaries,
                null);

            generator8.Generate(
                "Opc.Ua",
                "StatusCodes",
                $"{csvDir}UA Status Codes.csv",
                false);

            ConstantsGenerator generator9 = new ConstantsGenerator(
                Language.CSV,
                $"{modelDir}UA Status Codes.xml",
                outputDir,
                files.NodeDictionaries,
                null);

            generator9.Generate(
                "Opc.Ua",
                "StatusCodes",
                $"{csvDir}UA Status Codes.csv",
                false);

            DotNetGenerator generator10 = new DotNetGenerator(
                $"{modelDir}UA Core Services.xml",
                outputDir,
                files.TypeDictionaries,
                null);

            generator10.Generate("Opc.Ua", "Core", true);
        }
Example #3
0
        static void GenerateDotNet(Files files, string designerDir, string outputDir)
        {
            ConstantsGenerator generator7 = new ConstantsGenerator(
                Language.DotNet,
                designerDir + @"\Design\UA Attributes.xml",
                outputDir,
                files.NodeDictionaries);

            generator7.Generate(
                "Opc.Ua",
                "Attributes",
                designerDir + @"\Design\UA Attributes.csv",
                false);

            ConstantsGenerator generator8 = new ConstantsGenerator(
                Language.DotNet,
                designerDir + @"\Design\UA Status Codes.xml",
                outputDir,
                files.NodeDictionaries);

            generator8.Generate(
                "Opc.Ua",
                "StatusCodes",
                designerDir + @"\Design\UA Status Codes.csv",
                false);

            ConstantsGenerator generator9 = new ConstantsGenerator(
                Language.CSV,
                designerDir + @"\Design\UA Status Codes.xml",
                outputDir,
                files.NodeDictionaries);

            generator9.Generate(
                "Opc.Ua",
                "StatusCodes",
                designerDir + @"\Design\UA Status Codes.csv",
                false);

            DotNetGenerator generator10 = new DotNetGenerator(
                designerDir + @"\Design\UA Core Services.xml",
                outputDir,
                files.TypeDictionaries);

            generator10.Generate("Opc.Ua", "Core", true);
        }