Exemplo n.º 1
0
        /// <inheritdoc/>
        public async Task <MethodMetadataResultModel> NodeMethodGetMetadataAsync(
            string endpoint, MethodMetadataRequestModel request)
        {
            var result = await _client.NodeMethodGetMetadataAsync(endpoint,
                                                                  Map <MethodMetadataRequestApiModel>(request));

            return(Map <MethodMetadataResultModel>(result));
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public async Task <MethodMetadataResultModel> NodeMethodGetMetadataAsync(
            EndpointApiModel endpoint, MethodMetadataRequestModel request)
        {
            var result = await _client.NodeMethodGetMetadataAsync(endpoint,
                                                                  request.ToApiModel());

            return(result.ToServiceModel());
        }
Exemplo n.º 3
0
 /// <inheritdoc/>
 public async Task <MethodMetadataResultModel> NodeMethodGetMetadataAsync(
     string endpointId, MethodMetadataRequestModel request)
 {
     if (request == null)
     {
         throw new ArgumentNullException(nameof(request));
     }
     return(await CallServiceOnTwin <MethodMetadataRequestModel, MethodMetadataResultModel>(
                "MethodMetadata_V2", endpointId, request));
 }
 /// <inheritdoc/>
 public async Task <MethodMetadataResultModel> NodeMethodGetMetadataAsync(
     EndpointRegistrationModel registration, MethodMetadataRequestModel request)
 {
     if (request == null)
     {
         throw new ArgumentNullException(nameof(request));
     }
     return(await CallServiceOnSupervisor <MethodMetadataRequestModel, MethodMetadataResultModel>(
                "MethodMetadata_V2", registration, request));
 }
 /// <summary>
 /// Create from service model
 /// </summary>
 /// <param name="model"></param>
 public MethodMetadataRequestApiModel(MethodMetadataRequestModel model)
 {
     if (model == null)
     {
         throw new ArgumentNullException(nameof(model));
     }
     MethodId         = model.MethodId;
     MethodBrowsePath = model.MethodBrowsePath;
     Header           = model.Header == null ? null :
                        new RequestHeaderApiModel(model.Header);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Create from service model
 /// </summary>
 /// <param name="model"></param>
 public static MethodMetadataRequestApiModel ToApiModel(
     this MethodMetadataRequestModel model)
 {
     if (model == null)
     {
         return(null);
     }
     return(new MethodMetadataRequestApiModel {
         MethodId = model.MethodId,
         MethodBrowsePath = model.MethodBrowsePath,
         Header = model.Header.ToApiModel()
     });
 }
Exemplo n.º 7
0
 /// <inheritdoc/>
 public Task <MethodMetadataResultModel> NodeMethodGetMetadataAsync(
     string endpointId, MethodMetadataRequestModel request)
 {
     return(_nodes.NodeMethodGetMetadataAsync(Endpoint, request));
 }