/// <summary>
        /// Discover application
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <bool> DiscoverAsync(DiscoveryRequestInternalApiModel request)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }
            await _discover.DiscoverAsync(request.ToServiceModel());

            return(true);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Convert back to service model
 /// </summary>
 /// <returns></returns>
 public static DiscoveryRequestModel ToServiceModel(
     this DiscoveryRequestInternalApiModel model)
 {
     if (model == null)
     {
         return(null);
     }
     return(new DiscoveryRequestModel {
         Id = model.Id,
         Configuration = model.Configuration.ToServiceModel(),
         Discovery = (IIoT.OpcUa.Registry.Models.DiscoveryMode?)model.Discovery,
         Context = model.Context.ToServiceModel()
     });
 }