Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            if (this.disposed)
            {
                return;
            }
            this.disposed = true;

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

            this.asyncRestCaller.Dispose();
            this.asyncRestCaller = null;
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public YamsterApi(AppContext appContext)
 {
     this.asyncRestCaller = appContext.AsyncRestCaller;
     this.settings        = appContext.Settings;
 }
Exemplo n.º 5
0
 public ImageCache(AsyncRestCaller asyncRestCaller)
 {
     this.asyncRestCaller = asyncRestCaller;
 }