/// <summary> /// Create from service model /// </summary> /// <param name="model"></param> public AttributeReadRequestApiModel(AttributeReadRequestModel model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } NodeId = model.NodeId; Attribute = model.Attribute; }
/// <summary> /// Create from service model /// </summary> /// <param name="model"></param> public static AttributeReadRequestApiModel ToApiModel( this AttributeReadRequestModel model) { if (model == null) { return(null); } return(new AttributeReadRequestApiModel { NodeId = model.NodeId, Attribute = (IIoT.OpcUa.Api.Twin.Models.NodeAttribute)model.Attribute }); }