/// <summary> /// Constructor /// </summary> /// <param name="serverUrl"></param> /// <param name="org"></param> /// <param name="app"></param> /// <param name="channel"></param> internal Usergrid(string serverUrl, string org, string app, string userId, string password,string notifier) { string serverUrlWithSlash = serverUrl.EndsWith("/", StringComparison.CurrentCulture) ? serverUrl : serverUrl + "/"; this.appUrl = String.Format("{0}{1}/{2}/", serverUrlWithSlash, org, app); this.managementUrl = serverUrlWithSlash + "management/"; this.client = new HttpClient(); Authenticate(userId, password, false).ContinueWith(task => { this.push = new PushClient(this, userId, notifier); }); }
/// <summary> /// Constructor /// </summary> /// <param name="serverUrl"></param> /// <param name="org"></param> /// <param name="app"></param> /// <param name="channel"></param> internal Usergrid(string serverUrl, string org, string app, string userId, string password, string notifier) { string serverUrlWithSlash = serverUrl.EndsWith("/", StringComparison.CurrentCulture) ? serverUrl : serverUrl + "/"; this.appUrl = String.Format("{0}{1}/{2}/", serverUrlWithSlash, org, app); this.managementUrl = serverUrlWithSlash + "management/"; this.client = new HttpClient(); Authenticate(userId, password, false).ContinueWith(task => { this.push = new PushClient(this, userId, notifier); }); }
public NotificationsPageViewModel(IPushClient pushUserRegistrationClient) { this.pushUserRegistrationClient = pushUserRegistrationClient; this.Notifications = new ObservableCollection <string>(); PushContext.Current.RawNotification += this.OnRawNotification; PushContext.Current.PropertyChanged += (s, e) => { if (e.PropertyName.Equals("IsConnected", StringComparison.OrdinalIgnoreCase)) { this.NotifyPropertyChanged("ConnectionStatus"); } }; }
public NotificationsPageViewModel(IPushClient pushUserRegistrationClient) { this.pushUserRegistrationClient = pushUserRegistrationClient; this.Notifications = new ObservableCollection<string>(); PushContext.Current.RawNotification += this.OnRawNotification; PushContext.Current.PropertyChanged += (s, e) => { if (e.PropertyName.Equals("IsConnected", StringComparison.OrdinalIgnoreCase)) { this.NotifyPropertyChanged("ConnectionStatus"); } }; }
public MainWindow() { pc = new PushClient(); InitializeComponent(); SetPosition(); }