using asap.core; namespace asap.core { public interface IConfig { T Get(string key, T fallback); } public interface IEventAggregator {void Publish(T x);Stream GetEvent();} public class EventAggregator:IEventAggregator { readonly Dictionary events=new();public Stream GetEvent(){if(!events.ContainsKey(typeof(T)))events[typeof(T)]=new Stream();return (Stream)events[typeof(T)];} public void Publish(T x)=>GetEvent().Emit(x); } public interface IStageService{Task SwitchStageAsync(string s);} } public class Stream {public event Action Event;public IDisposable Subscribe(Action action){Event+=action;return new Subscription(()=>Event-=action);}public void Emit(T x)=>Event?.Invoke(x);} public class Subscription:IDisposable {Action end;public Subscription(Action a){end=a;}public void Dispose(){end?.Invoke();end=null;}} public static class GContext {static EventAggregator events=new();public static Stream OnEvent()=>events.GetEvent();public static void Publish(T x)=>events.Publish(x);public static Container container=new();} public class Container {public T Resolve()=>default;} namespace game {public class EvtAPISvrLoginSuccess{} public static class QuitStage{public static bool Logout;}} namespace UniRx {} namespace GameCore {} namespace UnityEngine {public static class Debug {public static void Log(object x){Console.WriteLine(x); } public static void LogError(object x){Console.WriteLine("PRODUCTION ERROR: "+x);}public static void LogException(Exception x){if(x is not OperationCanceledException)throw x;}}public class GameObject{public T GetComponent() where T:new()=>new();}} public static class Awaiters { public static Task NextFrame=>Task.CompletedTask; } public class UIManager {public static UIManager Instance=new();public Task ShowUI(object x)=>Task.FromResult(new UnityEngine.GameObject());} public static class UITypes {public static object NoticeConfirmPopupPanel=new();} public class NoticeConfirmPopupPanel {public void Init(int i,string title,string info,Action onClickLeft,Action onClose,string btn_left_text){}} public static class LocalizationMgr {public static string GetText(string s)=>s;} public static class LoadingScreen {public static Task Show()=>Task.CompletedTask;} namespace LitJson {} public static class GConstant {public const string K_Event_API_URL="EventApiURL";} namespace game {public class EvtAPISvrUnauthorized{public int SessionVersion{get;set;}}} class Config(string url):asap.core.IConfig {public T Get(string key,T fallback)=>(T)(object)url;}