Skip to main content

Mountain/RPC/CocoonService/GenericNotification/LanguageProviders/
Register.rs

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