コード例 #1
0
 public void Categorize()
 {
     var manager = new CategorizationManager();
     manager.Categorize();
 }
コード例 #2
0
        public async void Upload()
        {
            if (!Request.Content.IsMimeMultipartContent())
                throw new HttpResponseException(HttpStatusCode.UnsupportedMediaType);

            var provider = new MultipartMemoryStreamProvider();

            await Request.Content.ReadAsMultipartAsync(provider);

            var httpContent = provider.Contents.First();

            var fileContent = await httpContent.ReadAsStringAsync();

            var importer = new TransactionImporter();

            using (var stringReader = new StringReader(fileContent))
            {
                importer.Import(stringReader);
            }

            var manager = new CategorizationManager();
            manager.Categorize();
        }