private static void HandleEvent(InteropCall <IApplicationComponent, InteropEvent, bool> call, ElementId elementId, Event e, InteropEvent eventArg = null) { if (Call(call, elementId, eventArg)) { e.PreventDefault(); } }
public static TResult Invoke <TResult>(InteropCall <IBrowserComponent, None, TResult> kind, ElementId elementId) { return(JsRuntime.Invoke <TResult>(HandleMessageMethodFullName, new Message <None>() { CallId = kind.CallId, ElementId = elementId, })); }
public static void SendMessage(InteropCall <IBrowserComponent, None> call, ElementId elementId) { JsRuntime.Invoke <object>(HandleMessageMethodFullName, new Message <None>() { CallId = call.CallId, ElementId = elementId, }); }
public static TResult Invoke <TArg, TResult>(InteropCall <IBrowserComponent, TArg, TResult> kind, ElementId elementId, TArg arg) { return(JsRuntime.Invoke <TResult>(HandleMessageMethodFullName, new Message <TArg>() { CallId = kind.CallId, ElementId = elementId, Argument = arg })); }
public static void SendMessage <TArg>(InteropCall <IBrowserComponent, TArg> call, ElementId elementId, TArg arg) { JsRuntime.Invoke <object>(HandleMessageMethodFullName, new Message <TArg>() { CallId = call.CallId, ElementId = elementId, Argument = arg }); }
public static TResult Invoke <TArg, TResult>(InteropCall <IApplicationComponent, TArg, TResult> call, ElementId elementId, TArg arg) { //Console.WriteLine($"Browser.Invoking: {call.Name}"); return(InvokeExternalMethod <TResult>( InteropAssemblyName, HandleMessageMethodName, new Message <TArg>() { CallId = call.CallId, ElementId = elementId, Argument = arg })); }
public static void SendMessage <TArg>(InteropCall <IApplicationComponent, TArg> call, ElementId elementId, TArg arg) { //Console.WriteLine($"Browser.Sending: {call.Name}"); InvokeExternalMethod <object>( InteropAssemblyName, HandleMessageMethodName, new Message <TArg>() { CallId = call.CallId, ElementId = elementId, Argument = arg }); }
private static InteropCall <IApplicationComponent> GetCall(int callId) { return((InteropCall <IApplicationComponent>)InteropCall.Get(callId)); }
private static InteropCall <IBrowserComponent> GetCall(int callId) { return(As <InteropCall <IBrowserComponent> >(InteropCall.Get(callId))); }
private static bool Call(InteropCall <IApplicationComponent, InteropEvent, bool> call, ElementId id, InteropEvent e) { return(InteropBridge.Invoke(call, id, e)); }
private static void Send <TArg>(InteropCall <IApplicationComponent, TArg> call, ElementId id, TArg arg) { InteropBridge.SendMessage(call, id, arg); }
private static void Fire(InteropCall <IApplicationComponent, None> call, ElementId id) { InteropBridge.SendMessage(call, id, default(None)); }