Adding JS Executor
This commit is contained in:
Родитель
cfab58aa90
Коммит
fc72593eaf
|
@ -0,0 +1,12 @@
|
|||
namespace ReactNative.Bridge
|
||||
{
|
||||
public interface ICSharpJSExecutor
|
||||
{
|
||||
void close();
|
||||
|
||||
void executeApplicationScript(string script, string sourceURL);
|
||||
|
||||
string executeJSCall(string methodName, string jsonArgsArray);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
namespace ReactNative.Bridge
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract class responsible for brokering communication between native and React Naitve components
|
||||
/// </summary>
|
||||
public abstract class JavaScriptExecuter
|
||||
{
|
||||
private ICSharpJSExecutor mJSExecutor;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the JS executor
|
||||
/// </summary>
|
||||
/// <param name="executor"></param>
|
||||
public JavaScriptExecuter(ICSharpJSExecutor executor)
|
||||
{
|
||||
mJSExecutor = executor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the executor
|
||||
/// </summary>
|
||||
public abstract void close();
|
||||
|
||||
/// <summary>
|
||||
/// Instantiates the executor
|
||||
/// </summary>
|
||||
/// <param name="executor"></param>
|
||||
public abstract void initialize(ICSharpJSExecutor executor);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
namespace ReactNative.Bridge.Executors
|
||||
{
|
||||
public class ProxyJavaScriptExecutor : ICSharpJSExecutor
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче