コード例 #1
0
        public bool Execute()
        {
            Log("Starting MTT ConvertService");
            var localWorkingDir = ConvertServiceHelper.GetWorkingDirectory(Log, OriginalParameters.WorkingDirectory);
            var localConvertDir = ConvertServiceHelper.GetConvertDirectory(Log, OriginalParameters.ConvertDirectory);

            var parameters = new ConvertServiceParameters()
            {
                WorkingDirectory    = localWorkingDir,
                ConvertDirectory    = localConvertDir,
                ConvertToType       = OriginalParameters.ConvertToType,
                EnumValues          = OriginalParameters.EnumValues,
                PathStyle           = OriginalParameters.PathStyle,
                IsAutoGeneratedTag  = OriginalParameters.IsAutoGeneratedTag,
                IsModelInTSFileName = OriginalParameters.IsModelInTSFileName,
                Extends             = OriginalParameters.Extends,
                Implements          = OriginalParameters.Implements
            };

            var models = ConvertServiceModelLoader.GetModels(parameters.WorkingDirectory, parameters.WorkingDirectory);

            ConvertServiceModelFiller.BreakDown(models, parameters.WorkingDirectory, parameters.IsModelInTSFileName);
            ConvertServiceConverter.Convert(Log, models, parameters);

            Log("Finished MTT ConvertService");
            return(true);
        }
コード例 #2
0
 public ConvertService(LogAction log, ConvertServiceParameters parameters)
 {
     OriginalParameters = parameters;
     Log = log;
 }