public async Task<RegistrationKeyEntity> CreateRegistrationKey()
        {
            var registrationKeyEntity = new RegistrationKeyEntity();
            registrationKeyEntity.RegistrationKey = Guid.NewGuid().ToString();
            registrationKeyEntity.ValidUntil = DateTime.UtcNow.AddHours(2);

            var operation = TableOperation.InsertOrReplace(registrationKeyEntity);
            await _registrationKeysTable.ExecuteAsync(operation);
            return registrationKeyEntity;
        }
示例#2
0
        public async Task <RegistrationKeyEntity> CreateRegistrationKey()
        {
            var registrationKeyEntity = new RegistrationKeyEntity();

            registrationKeyEntity.RegistrationKey = Guid.NewGuid().ToString();
            registrationKeyEntity.ValidUntil      = DateTime.UtcNow.AddHours(2);

            var operation = TableOperation.InsertOrReplace(registrationKeyEntity);
            await _registrationKeysTable.ExecuteAsync(operation);

            return(registrationKeyEntity);
        }
 public async Task UpdateRegistrationKey(RegistrationKeyEntity registrationKey)
 {
     var operation = TableOperation.InsertOrReplace(registrationKey);
     await _registrationKeysTable.ExecuteAsync(operation);
 }
示例#4
0
 public async Task UpdateRegistrationKey(RegistrationKeyEntity registrationKey)
 {
     var operation = TableOperation.InsertOrReplace(registrationKey);
     await _registrationKeysTable.ExecuteAsync(operation);
 }