Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
    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();
    }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
    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");
    }