Exemple #1
0
        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);
        }
Exemple #2
0
 public YamsterApi(AppContext appContext)
 {
     this.asyncRestCaller = appContext.AsyncRestCaller;
     this.settings        = appContext.Settings;
 }