Пример #1
0
        private string finishUrl(string url, Dictionary <string, string> parameters)
        {
            string param = AsyncRestCaller.GetUrlEncodedParameters(parameters);

            if (string.IsNullOrEmpty(param))
            {
                return(url);
            }

            return(url + (url.Contains("?") ? "&" : "?") + param);
        }
Пример #2
0
        public void Dispose()
        {
            if (this.disposed)
            {
                return;
            }
            this.disposed = true;

            this.sqliteMapper.Dispose();
            this.sqliteMapper = null;

            this.asyncRestCaller.Dispose();
            this.asyncRestCaller = null;
        }
Пример #3
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);
        }
Пример #4
0
 public YamsterApi(AppContext appContext)
 {
     this.asyncRestCaller = appContext.AsyncRestCaller;
     this.settings        = appContext.Settings;
 }
Пример #5
0
 public ImageCache(AsyncRestCaller asyncRestCaller)
 {
     this.asyncRestCaller = asyncRestCaller;
 }