public void ApplicationStartBeforeInit(IApplication application) { s_Node.Start(); foreach (var dn in m_RemoteNodes) { s_Node.Connection(dn.Value, dn); } // Ensure proper cleanup of local node's global state application.RegisterAppFinishNotifiable(s_Node); }
public void ApplicationStartBeforeInit(IApplication application) { s_Node.Start(); foreach (var dn in m_RemoteNodes) { s_Node.Connection(dn.Value, dn); } //remember configs for remote nodes s_Node.RemoteNodeConfigs = (IConfigSectionNode[])m_RemoteNodes.Clone(); // Ensure proper cleanup of local node's global state application.RegisterAppFinishNotifiable(s_Node); }
public void BeforeTest() { var node = new ErlLocalNode("test@localhost", true, false); node.Start(); ErlApp.Node = node; store = new ErlDataStore(); store.RemoteName = REMOTE_NAME; store.RemoteCookie = REMOTE_COOKIE; store.QueryResolver.ScriptAssembly = SCRIPT_ASM; //store.QueryResolver.RegisterHandlerLocation("NFX.NUnit.Integration.CRUD.ErlSpecific, NFX.NUnit.Integration"); store.Start(); clearAll(); }
public void ApplicationStartBeforeInit(IApplication application) { s_Node.Start(); // Establish connections to all listed remote nodes m_AllNodes.Children .Where(n => n.Name.EqualsSenseCase("node") && !n.AttrByName(ErlConsts.CONFIG_IS_LOCAL_ATTR).ValueAsBool() && n.AttrByName(ErlConsts.ERLANG_CONNECT_ON_STARUP).ValueAsBool(true)) .ForEach(n => s_Node.Connection(n.Value, n)); //remember configs for remote nodes s_Node.AllNodeConfigs = m_AllNodes; // Ensure proper cleanup of local node's global state application.RegisterAppFinishNotifiable(s_Node); }
public void ApplicationStartBeforeInit(IApplication application) { s_Node.Start(); foreach (var dn in m_RemoteNodes) { if (dn.AttrByName(ErlConsts.ERLANG_CONNECT_ON_STARUP).ValueAsBool(true)) { s_Node.Connection(dn.Value, dn); } } //remember configs for remote nodes s_Node.RemoteNodeConfigs = (IConfigSectionNode[])m_RemoteNodes.Clone(); // Ensure proper cleanup of local node's global state application.RegisterAppFinishNotifiable(s_Node); }
private void btnErlang_Click(object sender, EventArgs e) { //connect to erlang var n = new ErlLocalNode("b", new ErlAtom("hahaha")); n.AcceptConnections = false; n.Start(); var m = n.CreateMbox("test"); var res = n.Send(m.Self, "[email protected]", "me", new ErlString("Hello! " + DateTime.Now)); if (!res) Console.WriteLine("Can not send message"); else Console.WriteLine("Message sent"); }