コード例 #1
0
        public void Invoke(string deviceId, string layerId, CreateLayerKeyRequestModel model)
        {
            PropertyLookup properties = new PropertyLookup();

            foreach (var modelTag in model.Properties)
            {
                properties.Add(modelTag.Key, modelTag.Value);
            }

            _deviceManager.AddKey(deviceId, layerId, model.KeyId, new KeyModel
            {
                Behavior   = model.Behavior,
                Properties = properties
            });
        }
コード例 #2
0
 public IActionResult CreateLayerKey(string deviceId, string layerId,
                                     [FromBody] CreateLayerKeyRequestModel model)
 {
     _createDeviceLayerKeyUseCase.Invoke(deviceId, layerId, model);
     return(Accepted());
 }