Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript types sent via commands cant be passed to c# side via ISimple commands #171

Open
jmecosta opened this issue Jan 29, 2021 · 0 comments

Comments

@jmecosta
Copy link

Have this interface in typescript

export interface ITafCommand {
  Execute(data:any) : void;
}

Call it with from typescript side

this.tafRunnerModel?.SaveSearchCommand?.Execute(addSearchList);

or html

@click="viewModel.tafRunnerModel.SaveSearchCommand.Execute(currentSearchList)"

if addSearchList is string or empty, the glue is able to pass on the data to c#!

if having a type like this

export class TafSearchList {
  constructor(
    public SearchListName?: string,
    public SearchData?: string
  ) {}
}
    [Serializable]
    public class TafSearchList
    {
        public string SearchListName { set; get; }
        public string SearchData { set; get; }
    }

I get this

>	Neutronium.Core.dll!Neutronium.Core.Binding.Mapper.JavascriptToGlueMapper.GetGlueConvertible(Neutronium.Core.WebBrowserEngine.JavascriptObject.IJavascriptObject javascriptObject, System.Type targetType) Line 45	C#
 	Neutronium.Core.dll!Neutronium.Core.Extension.JavascriptToGlueMapperExtension.GetFirstArgument<object>(Neutronium.Core.Binding.Mapper.IJavascriptToGlueMapper converter, Neutronium.Core.WebBrowserEngine.JavascriptObject.IJavascriptObject[] javascriptObjects) Line 21	C#
 	Neutronium.Core.dll!Neutronium.Core.Binding.GlueObject.Executable.JsSimpleCommand<object>.Neutronium.Core.Binding.GlueObject.IExecutableGlue.Execute(Neutronium.Core.WebBrowserEngine.JavascriptObject.IJavascriptObject[] e) Line 41	C#
 	Neutronium.Core.dll!Neutronium.Core.Binding.Builder.BulkJsHelper.ExecuteExecutable(Neutronium.Core.WebBrowserEngine.JavascriptObject.IJavascriptObject[] arguments) Line 39	C#
 	Neutronium.WebBrowserEngine.ChromiumFx.dll!Neutronium.WebBrowserEngine.ChromiumFx.Convertion.CfrV8HandlerHelper.Convert.AnonymousMethod__0(object o, Chromium.Remote.Event.CfrV8HandlerExecuteEventArgs e) Line 19	C#

Know issue, or am i doing something incorrectly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant