Ejemplo n.º 1
0
    static int SendNotification(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                PureMVC.Patterns.Facade obj = (PureMVC.Patterns.Facade)ToLua.CheckObject <PureMVC.Patterns.Facade>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.SendNotification(arg0);
                return(0);
            }
            else if (count == 3)
            {
                PureMVC.Patterns.Facade obj = (PureMVC.Patterns.Facade)ToLua.CheckObject <PureMVC.Patterns.Facade>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.SendNotification(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                PureMVC.Patterns.Facade obj = (PureMVC.Patterns.Facade)ToLua.CheckObject <PureMVC.Patterns.Facade>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                string arg2 = ToLua.CheckString(L, 4);
                obj.SendNotification(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: PureMVC.Patterns.Facade.SendNotification"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 2
0
 public virtual void SendNotification(string notificationName, object body, string type)
 {
     Facade.SendNotification(notificationName, body, type);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Send an <c>INotification</c>
 /// </summary>
 /// <param name="notificationName">The name of the notification to send</param>
 /// <param name="body">The body of the notification</param>
 /// <param name="type">The type of the notification</param>
 /// <remarks>Keeps us from having to construct new notification instances in our implementation code</remarks>
 /// <remarks>This method is thread safe</remarks>
 public virtual void SendNotification(string notificationName, object body, string type)
 {
     // The Facade SendNotification is thread safe, therefore this method is thread safe.
     Facade.SendNotification(notificationName, body, type);
 }
Ejemplo n.º 4
0
 public virtual void SendNotification(string notificationName)
 {
     Facade.SendNotification(notificationName);
 }
Ejemplo n.º 5
0
 public void SendNotification(string notificationName, object body = null, string type = null)
 {
     Facade.SendNotification(notificationName, body, type);
 }