Skip to content

Instantly share code, notes, and snippets.

View vmandic's full-sized avatar
🤠
chillin'

Vedran Mandić vmandic

🤠
chillin'
View GitHub Profile
@vmandic
vmandic / Program.cs
Created May 14, 2019 07:55
meds-processor, part/4, snippet #10
using System.Threading.Tasks;
using MedsProcessor.WebAPI.Core;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace MedsProcessor.WebAPI
{
public class Program
{
@vmandic
vmandic / HomeController.cs
Created May 14, 2019 07:48
meds-processor, part/4, snippet #9
using System.Text;
using MedsProcessor.WebAPI.Infrastructure;
using Microsoft.AspNetCore.Mvc;
namespace MedsProcessor.WebAPI.Controllers
{
public class HomeController : ApiControllerBase
{
static bool isFirstTimeRun = true;
@vmandic
vmandic / ApiResponse.cs
Created May 13, 2019 21:41
meds-processor, part/4, snippet #8
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using MedsProcessor.Common;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace MedsProcessor.WebAPI.Infrastructure
{
@vmandic
vmandic / ProcessorController.cs
Last active May 13, 2019 21:38
meds-processor, part/4, snippet #7
using System;
using System.Threading.Tasks;
using MedsProcessor.Common.Models;
using MedsProcessor.Downloader;
using MedsProcessor.Parser;
using MedsProcessor.Scraper;
using MedsProcessor.WebAPI.Core;
using MedsProcessor.WebAPI.Infrastructure;
using Microsoft.AspNetCore.Mvc;
@vmandic
vmandic / ApiControllerBase.cs
Last active May 14, 2019 08:51
meds-processor, part/4, snippet #6
using Microsoft.AspNetCore.Mvc;
namespace MedsProcessor.WebAPI.Controllers
{
[ApiController, Route("api)"]
[Consumes("application/json"), Produces("application/json")]
[ProducesResponseType(406), ProducesResponseType(426)]
[ProducesResponseType(200), ProducesResponseType(400), ProducesResponseType(500)]
public abstract class ApiControllerBase : ControllerBase { }
}
@vmandic
vmandic / HzzoProcessorStatus.cs
Last active May 17, 2019 11:39
meds-processor, part/4, snippet #6
using System;
using MedsProcessor.Common;
namespace MedsProcessor.WebAPI.Core
{
public class HzzoDataProcessorStatus
{
public HzzoDataProcessorStatus(
bool wasDataLoaded,
ProcessorState processorState,
@vmandic
vmandic / HzzoDataProcessor.cs
Created May 12, 2019 18:42
meds-processor, part/4, snippet #5
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MedsProcessor.Common;
using MedsProcessor.Common.Models;
using MedsProcessor.Downloader;
using MedsProcessor.Parser;
using MedsProcessor.Scraper;
@vmandic
vmandic / HzzoData.cs
Last active May 12, 2019 19:10
meds-processor, part/4, snippet #4
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using MedsProcessor.Common;
using MedsProcessor.Common.Models;
namespace MedsProcessor.WebAPI.Core
{
public class HzzoData
@vmandic
vmandic / HzzoExcelParser.cs
Last active May 12, 2019 19:11
meds-processor part/4 sinppet #3
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MedsProcessor.Common;
using MedsProcessor.Common.Extensions;
using MedsProcessor.Common.Models;
using NPOI.HSSF.UserModel;
@vmandic
vmandic / HzzoMedsDownloadDto.cs
Last active May 10, 2019 19:33
meds-processor part/4 snippet #2
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace MedsProcessor.Common.Models
{
public class HzzoMedsDownloadDto