TransformText() 공개 메소드

Create the template output
public TransformText ( ) : string
리턴 string
		public async Task Generate(IProjectFolder folder)
		{
			await Task.Factory.StartNew(async () =>
			{
				var name = _settings.ClassName;

				var sourceTemplate = new CPlusPlusClassTemplate(name, _settings.GenerateHeader);
				var headerTemplate = new CPlusPlusClassHeaderTemplate(name);

				if (_settings.GenerateHeader)
				{
					await SourceFile.Create(folder, $"{(name.Contains('.') ? name : name + ".h")}", headerTemplate.TransformText());
				}

				if (_settings.GenerateClass)
				{
                    await SourceFile.Create(folder, $"{name}.cpp", sourceTemplate.TransformText());
				}
			});
		}
예제 #2
0
        public async Task Generate(IProjectFolder folder)
        {
            await Task.Factory.StartNew(async() =>
            {
                var name = _settings.ClassName;

                var sourceTemplate = new CPlusPlusClassTemplate(name, _settings.GenerateHeader);
                var headerTemplate = new CPlusPlusClassHeaderTemplate(name);

                if (_settings.GenerateHeader)
                {
                    await SourceFile.Create(folder, $"{(name.Contains('.') ? name : name + ".h")}", headerTemplate.TransformText());
                }

                if (_settings.GenerateClass)
                {
                    await SourceFile.Create(folder, $"{name}.cpp", sourceTemplate.TransformText());
                }
            });
        }