コード例 #1
0
        async Task <IDataModel> SaveExcel(RequestUpload ru, Stream stream, ExpandoObject prms)
        {
            using (var xp = new ExcelParser())
            {
                xp.ErrorMessage = "UI:@[Error.FileFormatException]";
                IDataModel dm = await _dbContext.SaveModelAsync(ru.CurrentSource, ru.UpdateProcedure, null, prms, (table) => {
                    return(xp.ParseFile(stream, table));
                });

                return(dm);
            }
        }
コード例 #2
0
        async Task <Object> DoUploadClr(RequestUpload ru, ExpandoObject prms)
        {
            var    invoker = new ClrInvoker();
            Object result;

            if (ru.async)
            {
                result = await invoker.InvokeAsync(ru.clrType, prms);
            }
            else
            {
                result = invoker.Invoke(ru.clrType, prms);
            }
            return(result);
        }