예제 #1
0
        public async Task <UpdateResult <NetworkEndpoint> > UpdateEndpointAsync(NetworkEndpoint item)
        {
            validator.Validate(item);
            var result = await service.UpdateAsync(item);

            log.LogInformation("Updated NetworkEndpoint. Result:{@Result}", result);
            return(result);
        }
예제 #2
0
 public static NetworkEndpoint From(NetworkEndpoint e)
 {
     if (e == null)
     {
         return(null);
     }
     return(new NetworkEndpoint
     {
         Id = e.Id,
         Name = e.Name,
         Address = new Uri(e.Address.ToString()),
         Issuer = e.Issuer,
         KeyId = e.KeyId,
         Certificate = (byte[])e.Certificate.Clone(),
         IsInterrogator = e.IsInterrogator,
         IsResponder = e.IsResponder
     });
 }
예제 #3
0
 public void Put(NetworkEndpoint endpoint)
 {
     sync.EnterWriteLock();
     store[endpoint.Issuer] = endpoint;
     sync.ExitWriteLock();
 }