init
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
public class LocalConfig
|
||||
{
|
||||
public static string authToken
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(_authToken))
|
||||
{
|
||||
JObject localSecrets = JObject.Parse(File.ReadAllText("localSecrets.json"));
|
||||
_authToken = (string) ((JObject) localSecrets["matrix"])["auth_token"];
|
||||
}
|
||||
|
||||
return _authToken;
|
||||
}
|
||||
}
|
||||
private static string _authToken;
|
||||
|
||||
public static string homeserver
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(_homeserver))
|
||||
{
|
||||
JObject localSecrets = JObject.Parse(File.ReadAllText("localSecrets.json"));
|
||||
_homeserver = (string) ((JObject) localSecrets["matrix"])["homeserver"];
|
||||
}
|
||||
|
||||
return _homeserver;
|
||||
}
|
||||
}
|
||||
private static string _homeserver;
|
||||
}
|
||||
Reference in New Issue
Block a user