예제 #1
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="TemplateString"></param>
		/// <returns></returns>
		async protected Task<Type> GetTemplateCodeTypeByStringAsync(String TemplateString)
		{
			var TemplateCodeGen = new TemplateCodeGen(TemplateString, this);
			TemplateCodeGen.OutputGeneratedCode = OutputGeneratedCode;

			Exception YieldedException = null;

			var Value = await Task.Run(() =>
			{
				try
				{
					return TemplateCodeGen.GetTemplateCodeType();
				}
				catch (Exception Exception)
				{
					YieldedException = Exception;
					return null;
				}
			});

			if (YieldedException != null) throw YieldedException;

			return Value;
			//return new TemplateCodeGenRoslyn(TemplateString, this).GetTemplateCodeType();
		}
예제 #2
0
		protected Type GetTemplateCodeTypeByString(String TemplateString)
		{
			var TemplateCodeGen = new TemplateCodeGen(TemplateString, this);
			TemplateCodeGen.OutputGeneratedCode = OutputGeneratedCode;

			return TemplateCodeGen.GetTemplateCodeType();
			//return new TemplateCodeGenRoslyn(TemplateString, this).GetTemplateCodeType();
		}
예제 #3
0
        protected Type GetTemplateCodeTypeByString(String TemplateString)
        {
            var TemplateCodeGen = new TemplateCodeGen(TemplateString, this);

            TemplateCodeGen.OutputGeneratedCode = OutputGeneratedCode;

            return(TemplateCodeGen.GetTemplateCodeType());
            //return new TemplateCodeGenRoslyn(TemplateString, this).GetTemplateCodeType();
        }
예제 #4
0
		protected static TemplateCode CompileTemplateCodeByString(String Code) {
			var TemplateCodeGen = new TemplateCodeGen(Code);
			TemplateCodeGen.OutputGeneratedCode = true;
			return TemplateCodeGen.GetTemplateCode();
		}