Beispiel #1
0
        public static async void UpdateStatus(LessonStatus status)
        {
            if (status != null)
            {
                if (status.AccessToken == null || String.IsNullOrWhiteSpace(status.AccessToken))
                {
                    status.AccessToken = ACCESS_TOKEN;
                }
                using (var client = new HttpClient())
                {
                    client.BaseAddress = new Uri(BASE_ADDRESS);

                    using (var req = new HttpRequestMessage(HttpMethod.Post, "api/StatusApi/Update"))
                    {
                        req.Content = new StringContent(JsonConvert.SerializeObject(status), Encoding.UTF8, "application/json");
                        await client.SendAsync(req);
                    }
                }
            }
        }
Beispiel #2
0
 public StatusEventArgs(LessonStatus status)
 {
     Status = status;
 }
 static LessonStatusHelper()
 {
     LessonStatus = new LessonStatus();
 }