Mountain/RPC/CocoonService/GenericNotification/LanguageProviders/Register.rs
1#![allow(unused_variables, dead_code, unused_imports)]
2
3//! Register a language feature provider by handle, selector, extension.
4
5use CommonLibrary::LanguageFeature::DTO::ProviderType::ProviderType;
6use serde_json::Value;
7
8use crate::RPC::CocoonService::CocoonServiceImpl;
9
10pub fn Fn(Params:Value, Service:&CocoonServiceImpl, ProvType:ProviderType) {
11 let Handle = Params.get("handle").and_then(|V| V.as_u64()).unwrap_or(0) as u32;
12
13 let Selector = Params.get("language_selector").and_then(|V| V.as_str()).unwrap_or("*");
14
15 let ExtId = Params.get("extension_id").and_then(|V| V.as_str()).unwrap_or("");
16
17 Service.RegisterProvider(Handle, ProvType, Selector, ExtId);
18}