internal DotabuffMappingController(JsonPaths jsonPaths) { JsonController jsonReader = new JsonController(); GistClient gistClient = new GistClient(); var gistFiles = gistClient.GetGist("ebaba232180a83083cd1d9a2d7db65da"); //dotabuffXPaths = jsonReader.ReadFromFile(jsonPaths.XPathsUri); dotabuffXPaths = jsonReader.ReadFromString(gistFiles["XPaths"].Content); //dotabuffQueryStrings = jsonReader.ReadFromFile(jsonPaths.QueryStringsUri); dotabuffQueryStrings = jsonReader.ReadFromString(gistFiles["QueryStrings"].Content); //dotabuffEnums = jsonReader.ReadFromFile(jsonPaths.EnumsUri); dotabuffEnums = jsonReader.ReadFromString(gistFiles["Enums"].Content); //dotabuffSelectors = jsonReader.ReadFromFile(jsonPaths.SelectorsUri); dotabuffSelectors = jsonReader.ReadFromString(gistFiles["Selectors"].Content); //dotabuffHtmlAttributes = jsonReader.ReadFromFile(jsonPaths.HtmlAttributesUri); dotabuffHtmlAttributes = jsonReader.ReadFromString(gistFiles["HtmlAttributes"].Content); //dotabuffUrls = jsonReader.ReadFromFile(jsonPaths.UrlsUri); dotabuffUrls = jsonReader.ReadFromString(gistFiles["Urls"].Content); }
internal dynamic ReadFromFile(string filePath) { var gist = new GistClient(); gist.GetGist("ebaba232180a83083cd1d9a2d7db65da"); var path = Path.Combine(HostingEnvironment.MapPath("~/"), filePath); string jsonString = File.ReadAllText(path); return(ReadFromString(jsonString)); }