public GrpcCrossChainClientNodePluginTest() { _grpcCrossChainServerNodePlugin = GetRequiredService <INodePlugin>(); _grpcCrossChainClientNodePlugin = GetRequiredService <GrpcCrossChainClientNodePlugin>(); _chainOptions = GetRequiredService <IOptionsSnapshot <ChainOptions> >().Value; _grpcCrossChainConfigOption = GetRequiredService <IOptionsSnapshot <GrpcCrossChainConfigOption> >().Value; }
public void Execute(IEnumerable <CustomPlugin> customPlugins, INodePluginContext p) { foreach (CustomPlugin customPlugin in customPlugins) { // localResult = null; if (customPlugin != null) { INodePlugin plugin = p.CustomPluginAccessor.LoadPlugin(customPlugin.CustomPluginName); // Here the customplugin's context is attached // the dataloader's context is attached in the iterator p.OwnContextScoped = p.CustomPluginAccessor.GetPluginsSynchronizeContextScoped(customPlugin.CustomPluginName, plugin).Result; plugin?.Execute(p); } } }