Exemple #1
0
 void Callback(GetRegistrationResponse response)
 {
     Debug.WriteLine(response.Active);
     Debug.WriteLine(response.Alias);
     Debug.WriteLine(response.Created);
     Debug.WriteLine(string.Join(" ", response.Tags));
 }
 void Callback(GetRegistrationResponse response)
 {
     Debug.WriteLine(response.Badge);
     Debug.WriteLine(response.Alias);
     Debug.WriteLine(response.QuietTime);
     Debug.WriteLine(response.TimeZone);
     Debug.WriteLine(string.Join(" ", response.Tags));
 }
Exemple #3
0
        public async Task <GetRegistrationResponse> GetRegistration(string registrationId)
        {
            if (!_memoryCache.TryGetValue(registrationId, out Registration registration))
            {
                return(await Task.FromResult <GetRegistrationResponse>(null));
            }

            var response = new GetRegistrationResponse
            {
                Id               = registration.Id,
                Locale           = registration.Locale,
                Organisation     = registration.Organisation,
                Person           = registration.Person,
                RegistrationDate = registration.RegistrationDate
            };

            return(await Task.FromResult(response));
        }