internal IDictionary <string, object> AddLocationToParameters(object parameters) { var dictionary = BuddyServiceClientBase.ParametersToDictionary(parameters); var loc = LastLocation; if (!dictionary.ContainsKey("location") && loc != null) { dictionary["location"] = loc.ToString(); } return(dictionary); }
protected virtual async Task <IRemoteMethodProvider> GetService() { using (await getServiceAsyncLock.LockAsync()) { if (this._service != null) { return(this._service); } var root = GetRootUrl(); this._service = BuddyServiceClientBase.CreateServiceClient(this, root, AppId, sharedSecret); this._service.ServiceException += (object sender, ExceptionEventArgs e) => { if (e.Exception is BuddyUnauthorizedException) { ClearCredentials(true, true); } }; return(_service); } }