mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-25 18:34:44 +00:00
feat: move MC into Essentials
In order to solve some dependency issues that keep cropping up, MC should be moved back into the Essentials repo and loaded automatically on startup. This will allow for all plugins that use the MC Messengers library to use the same version without fear of overwriting a dll due to loading of plugin libraries.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
internal class WebSocketServerSecretProvider : CrestronLocalSecretsProvider
|
||||
{
|
||||
public WebSocketServerSecretProvider(string key)
|
||||
: base(key)
|
||||
{
|
||||
Key = key;
|
||||
}
|
||||
}
|
||||
|
||||
public class WebSocketServerSecret : ISecret
|
||||
{
|
||||
public ISecretProvider Provider { get; private set; }
|
||||
|
||||
public string Key { get; private set; }
|
||||
|
||||
public object Value { get; private set; }
|
||||
|
||||
public WebSocketServerSecret(string key, object value, ISecretProvider provider)
|
||||
{
|
||||
Key = key;
|
||||
Value = JsonConvert.SerializeObject(value);
|
||||
Provider = provider;
|
||||
}
|
||||
|
||||
public ServerTokenSecrets DeserializeSecret()
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ServerTokenSecrets>(Value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user