moved to logic from api to lib
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
This commit is contained in:
23
GamsSets.cs
Normal file
23
GamsSets.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FarmMapsAPI.Carbon
|
||||
{
|
||||
public class GamsSets
|
||||
{
|
||||
public static T ReadSets<T>(string jsonFile)
|
||||
{
|
||||
T data;
|
||||
using (StreamReader r = new StreamReader(jsonFile))
|
||||
{
|
||||
string json = r.ReadToEnd();
|
||||
data = JsonConvert.DeserializeObject<T>(json);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user