예제 #1
0
        public override async Task <ConversionResult> ConvertTagWithResult(string tag, string content)
        {
            string           _result     = string.Empty;
            ConversionResult returnValue = null;

            try
            {
                switch (tag.ToLowerInvariant())
                {
                case "asp:content":
                    returnValue = ConversionResult.Init(true, await ConvertContentControl(content));

                    break;

                case "asp:formview":
                    returnValue = ConversionResult.Init(true, await ConvertContentControl(content));
                    break;

                case "asp:editform":
                    returnValue = ConversionResult.Init(true, await ConvertContentControl(content));
                    break;

                case "asp:listview":
                    returnValue = ConversionResult.Init(true, await ConvertContentControl(content));
                    break;

                default:
                    returnValue = ConversionResult.Init(true, await ConvertGenericControl(content));
                    break;
                }
            }
            catch (Exception ex)
            {
                returnValue = ConversionResult.Init(false, ex.Message);
            }

            return(returnValue);
        }