Files
CC-Framework.BriskGameServer/Assets/BriskSdk/Runtime/Core/BriskContext.cs

29 lines
828 B
C#

using System;
public sealed class BriskContext
{
public BriskContext(BriskOptions options)
{
Options = options ?? throw new ArgumentNullException(nameof(options));
Session = new BriskSession();
ErrorPresenter = options.ErrorPresenter ?? BriskDefaultErrorPresenter.Instance;
ExitHandler = options.ExitHandler;
TokenStore = options.TokenStore ?? new BriskPlayerPrefsTokenStore();
HttpClient = new BriskHttpClient(this);
}
public BriskOptions Options { get; }
public BriskSession Session { get; }
public BriskBootstrapResult Bootstrap { get; set; }
public IBriskTokenStore TokenStore { get; }
public BriskHttpClient HttpClient { get; }
public IBriskErrorPresenter ErrorPresenter { get; set; }
public Action ExitHandler { get; set; }
}