예제 #1
0
    public static void Main(string[] args)
    {
        Application.Init ();
        try {
        DBus.Connection connection = DBus.Bus.GetSessionBus ();
        DBus.Service service =
            new DBus.Service (connection,
                      NotificationDaemon.Service);

        NotificationDaemon ndaemon= new NotificationDaemon ();
        service.RegisterObject (ndaemon, NotificationDaemon.Path);

        Console.WriteLine ("Daemon active.");
        } catch (Exception e) {
        Console.WriteLine ("Daemon active.", e.Message);
        }
        Application.Run ();
    }
예제 #2
0
    public static void Main(string[] args)
    {
        Application.Init();
        try {
            DBus.Connection connection = DBus.Bus.GetSessionBus();
            DBus.Service    service    =
                new DBus.Service(connection,
                                 NotificationDaemon.Service);

            NotificationDaemon ndaemon = new NotificationDaemon();
            service.RegisterObject(ndaemon, NotificationDaemon.Path);

            Console.WriteLine("Daemon active.");
        } catch (Exception e) {
            Console.WriteLine("Daemon active.", e.Message);
        }
        Application.Run();
    }