public AppContext() { this.ValidateOsEnvironment(); this.foregroundThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; this.settings = new YamsterApiSettings(this); this.settings.Load(); this.settings.Save(); // normalize settings file this.asyncRestCaller = new AsyncRestCaller(this); this.yamsterApi = new YamsterApi(this); this.userManager = new LightweightUserManager(this); this.imageCache = new ImageCache(this.asyncRestCaller); }
public YamsterApi(AppContext appContext) { this.asyncRestCaller = appContext.AsyncRestCaller; this.settings = appContext.Settings; }