public ClientContext(string configPath, IMessenger m) { configPath = configPath.ResolveSpecial(); _testing = this; //todo: hack for now. if (string.IsNullOrWhiteSpace(configPath)) { throw new ArgumentException($"\'{nameof(configPath)}\' cannot be empty."); } Config = PrimeClientConfig.Get(Path.GetFullPath(configPath)); M = m; }
public ClientContext(string configPath, IMessenger messenger) { if (Testing != null) { throw new Exception(nameof(ClientContext) + " is already initialised in this app domain."); } if (string.IsNullOrWhiteSpace(configPath)) { throw new ArgumentException($"\'{nameof(configPath)}\' cannot be empty."); } Config = PrimeClientConfig.Get(Path.GetFullPath(configPath)); Messenger = messenger; Testing = this; }