public JsResultCommand(IWebView webView, IJavascriptToCSharpConverter converter, IResultCommand resultCommand) { _WebView = webView; _JavascriptToCSharpConverter = converter; _JSResultCommand = resultCommand; JSValue = _WebView.Factory.CreateObject(true); }
public JsSimpleCommand(IWebView webView, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand) { _WebView = webView; _JavascriptToCSharpConverter = converter; _JSSimpleCommand = simpleCommand; JSValue = _WebView.Factory.CreateObject(true); }
internal CollectionChanges(IJavascriptToCSharpConverter jSCBridgeCache, JavascriptCollectionChanges changes, Type targetedType) { _IJSCBridgeCache = jSCBridgeCache; _TargetedType = targetedType; IndividualChanges = changes.Changes .Select(jvchnage => new IndividualCollectionChange(jvchnage, _IJSCBridgeCache, _TargetedType)) .OrderBy(idc => idc, this).ToArray(); }
public JsCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand command) : base(context, converter) { _Command = command; try { _CanExecute = _Command.CanExecute(null); } catch { } }
public JSCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ICommand command) { _JavascriptToCSharpConverter = converter; _HTMLViewContext = context; _Command = command; try { _InitialCanExecute = _Command.CanExecute(null); } catch { } }
private static object GetArgument(this IJavascriptToCSharpConverter converter, IJavascriptObject javascriptObject, Type targetType) { try { var found = converter.GetCachedOrCreateBasic(javascriptObject, targetType); return(found?.CValue); } catch (Exception) { return(null); } }
public static Result <T> GetFirstArgument <T>(this IJavascriptToCSharpConverter converter, IJavascriptObject[] javascriptObjects) { if (javascriptObjects.Length == 0) { return(new Result <T>()); } try { var found = converter.GetCachedOrCreateBasic(javascriptObjects[0], typeof(T)); return(new Result <T>(found)); } catch (Exception) { return(new Result <T>()); } }
public JSCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ICommand command) { _JavascriptToCSharpConverter = converter; _HTMLViewContext = context; _Command = command; var canexecute = true; try { canexecute = _Command.CanExecute(null); } catch { } JSValue = WebView.Evaluate(() => { var res = WebView.Factory.CreateObject(true); res.SetValue("CanExecuteValue", WebView.Factory.CreateBool(canexecute)); res.SetValue("CanExecuteCount", WebView.Factory.CreateInt(_Count)); return res; }); }
public JSCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ICommand command) { _JavascriptToCSharpConverter = converter; _HTMLViewContext = context; _Command = command; var canexecute = true; try { canexecute = _Command.CanExecute(null); } catch { } JSValue = WebView.Evaluate(() => { var res = WebView.Factory.CreateObject(true); res.SetValue("CanExecuteValue", WebView.Factory.CreateBool(canexecute)); res.SetValue("CanExecuteCount", WebView.Factory.CreateInt(_Count)); return(res); }); }
internal static IGlueFactory GetFactory(HtmlViewContext context, ICSharpToJsCache cacher, IJavascriptToCSharpConverter converter, ObjectChangesListener onListener) { var isMapping = context.JavascriptFrameworkIsMappingObject; return(isMapping ? (IGlueFactory) new GlueMappingFactory(context, cacher, converter, onListener) : new GlueFactory(context, cacher, converter, onListener)); }
public IndividualCollectionChange(IndividualJavascriptCollectionChange change, IJavascriptToCSharpConverter converter, Type targetType) { CollectionChangeType = change.CollectionChangeType; Index = change.Index; Object = converter.GetCachedOrCreateBasic(change.Object, targetType); }
public Neutronium.Core.Binding.CollectionChanges.CollectionChanges GetChanger(JavascriptCollectionChanges changes, IJavascriptToCSharpConverter bridge) { return new Neutronium.Core.Binding.CollectionChanges.CollectionChanges(bridge, changes, _IndividualType); }
internal CollectionChanges(IJavascriptToCSharpConverter iJSCBridgeCache, JavascriptCollectionChanges changes, Type iTargetedType) { _IJSCBridgeCache = iJSCBridgeCache; _TargetedType = iTargetedType; _Changes = changes; }
internal static IGlueFactory GetFactory(HTMLViewContext context, IJavascriptToCSharpConverter converter) { var isMapping = context.JavascriptFrameworkIsMappingObject; return(isMapping ? (IGlueFactory) new GlueMappingFactory(context, converter) : new GlueFactory(context, converter)); }
public CollectionChanges.CollectionChanges GetChanger(JavascriptCollectionChanges changes, IJavascriptToCSharpConverter bridge) { return(new CollectionChanges.CollectionChanges(bridge, changes, _IndividualType)); }
protected JsCommandBase(HtmlViewContext context, IJavascriptToCSharpConverter converter) { _JavascriptToCSharpConverter = converter; _HtmlViewContext = context; }
public JsResultCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, IResultCommand <TArg, TResult> resultCommand) : base(context, converter) { _JsResultCommand = resultCommand; }
public JsResultCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, IResultCommand resultCommand) { _HTMLViewContext = context; _JavascriptToCSharpConverter = converter; _JSResultCommand = resultCommand; }
public static object GetFirstArgumentOrNull(this IJavascriptToCSharpConverter converter, IJavascriptObject[] javascriptObjects) { return(javascriptObjects.Length == 0 ? null : converter.GetArgument(javascriptObjects[0], null)); }
public JsCommandWithoutParameter(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommandWithoutParameter command) : base(context, converter) { _Command = command; _CanExecute = _Command.CanExecute; }
public JsSimpleCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand) { _HTMLViewContext = context; _JavascriptToCSharpConverter = converter; _JSSimpleCommand = simpleCommand; }
public JsMappableResultCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, IResultCommand <TArg, TResult> resultCommand) : base(context, converter, resultCommand) { }
public GlueFactory(HTMLViewContext context, IJavascriptToCSharpConverter converter) { _HTMLViewContext = context; _JavascriptToCSharpConverter = converter; }
public JsMappableCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand command) : base(context, converter, command) { }
public JsSimpleCommandBase(HtmlViewContext context, IJavascriptToCSharpConverter converter) { _HtmlViewContext = context; _JavascriptToCSharpConverter = converter; }
public JsMappedCommandWithoutParameter(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommandWithoutParameter command) : base(context, converter, command) { }
public Neutronium.Core.Binding.CollectionChanges.CollectionChanges GetChanger(JavascriptCollectionChanges changes, IJavascriptToCSharpConverter bridge) { return(new Neutronium.Core.Binding.CollectionChanges.CollectionChanges(bridge, changes, _IndividualType)); }
public CommandFactory(HTMLViewContext context, IJavascriptToCSharpConverter converter) { _HTMLViewContext = context; _JavascriptToCSharpConverter = converter; }
public JsMappedCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand <T> resultCommand) : base(context, converter, resultCommand) { }
public JsCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand <T> command) : base(context, converter) { _Command = command; _CanExecute = true; }
public JsSimpleCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand) : base(context, converter) { _JsSimpleCommand = simpleCommand; }
public JsMappableSimpleCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand resultCommand) : base(context, converter, resultCommand) { }
public GlueFactory(HtmlViewContext context, ICSharpToJsCache cacher, IJavascriptToCSharpConverter converter, ObjectChangesListener onListener) : base(cacher, onListener) { _HtmlViewContext = context; _JavascriptToCSharpConverter = converter; }