internal static int ctx_should_process(string taskId, string ns) { if (IsWindows()) { return(CBridgeWin.ctx_should_process(taskId, ns)); } if (IsLinux()) { return(CBridgeLinux.ctx_should_process(taskId, ns)); } throw new NotImplementedException(NoImplementedError); }
internal static IntPtr /* NativeError */ ctx_always_apply(string taskId, string ns, NativeModifiers nativeModifiers) { if (IsWindows()) { return(CBridgeWin.ctx_always_apply(taskId, ns, nativeModifiers)); } if (IsLinux()) { return(CBridgeLinux.ctx_always_apply(taskId, ns, nativeModifiers)); } throw new NotImplementedException(NoImplementedError); }
internal static IntPtr /* NativeError */ define_example_config(string config) { if (IsWindows()) { return(CBridgeWin.define_example_config(config)); } if (IsLinux()) { return(CBridgeLinux.define_example_config(config)); } throw new NotImplementedException(NoImplementedError); }
internal static IntPtr /* NativeError */ ctx_add_metric(string taskId, string ns, NativeValue nativeValue, NativeModifiers nativeModifiers) { if (IsWindows()) { return(CBridgeWin.ctx_add_metric(taskId, ns, nativeValue, nativeModifiers)); } if (IsLinux()) { return(CBridgeLinux.ctx_add_metric(taskId, ns, nativeValue, nativeModifiers)); } throw new NotImplementedException(NoImplementedError); }
internal static string ctx_log(string taskId, int level, string message, IntPtr /* NativeMap */ fields) { if (IsWindows()) { return(CBridgeWin.ctx_log(taskId, level, message, fields)); } if (IsLinux()) { return(CBridgeLinux.ctx_log(taskId, level, message, fields)); } throw new NotImplementedException(NoImplementedError); }
internal static string ctx_add_warning(string taskId, string message) { if (IsWindows()) { return(CBridgeWin.ctx_add_warning(taskId, message)); } if (IsLinux()) { return(CBridgeLinux.ctx_add_warning(taskId, message)); } throw new NotImplementedException(NoImplementedError); }
internal static IntPtr ctx_raw_config(string taskId) { if (IsWindows()) { return(CBridgeWin.ctx_raw_config(taskId)); } if (IsLinux()) { return(CBridgeLinux.ctx_raw_config(taskId)); } throw new NotImplementedException(NoImplementedError); }
internal static void ctx_dismiss_all_modifiers(string taskId) { if (IsWindows()) { CBridgeWin.ctx_dismiss_all_modifiers(taskId); } else if (IsLinux()) { CBridgeLinux.ctx_dismiss_all_modifiers(taskId); } else { throw new NotImplementedException(NoImplementedError); } }
internal static void define_instances_limit(int limit) { if (IsWindows()) { CBridgeWin.define_instances_limit(limit); } else if (IsLinux()) { CBridgeLinux.define_instances_limit(limit); } else { throw new NotImplementedException(NoImplementedError); } }
internal static void define_group(string name, string description) { if (IsWindows()) { CBridgeWin.define_group(name, description); } else if (IsLinux()) { CBridgeLinux.define_group(name, description); } else { throw new NotImplementedException(NoImplementedError); } }
// DefinePlugin related functions internal static void define_metric(string ns, string unit, int isDefault, string description) { if (IsWindows()) { CBridgeWin.define_metric(ns, unit, isDefault, description); } else if (IsLinux()) { CBridgeLinux.define_metric(ns, unit, isDefault, description); } else { throw new NotImplementedException(NoImplementedError); } }
// Runner internal static void start_collector( Runner.CollectHandler collectHandler, Runner.LoadHandler loadHandler, Runner.UnloadHandler unloadHandler, Runner.DefineHandler defineHandler, string name, string version ) { if (IsWindows()) { CBridgeWin.start_collector(collectHandler, loadHandler, unloadHandler, defineHandler, name, version); } else if (IsLinux()) { CBridgeLinux.start_collector(collectHandler, loadHandler, unloadHandler, defineHandler, name, version); } else { throw new NotImplementedException(NoImplementedError); } }