Created
October 13, 2018 18:38
-
-
Save vmandic/f0892f7c60c66b03a2a8dfda8bd35d5c to your computer and use it in GitHub Desktop.
meds-processor, part 1 of 4, snippet 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace MedsProcessor.Common.Models | |
{ | |
public class HzzoMedsDownloadDto | |
{ | |
private readonly string _rootLocation; | |
public HzzoMedsDownloadDto(string href, string validFrom, string rootLocation) | |
{ | |
this.Href = href; | |
this.ValidFrom = DateTime.Parse(validFrom); | |
this._rootLocation = rootLocation; | |
} | |
public string FileName => | |
ValidFrom.ToString("yyyy-MM-dd_") + | |
(Href.Split('/').LastOrDefault() ?? Href.Replace("/", "_").Replace(":", "_")).TrimEnd(); | |
public string Href { get; internal set; } | |
public DateTime ValidFrom { get; private set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment