Esempio n. 1
0
    public TestService(Ice.Communicator serviceManagerCommunicator)
    {
        var facet = new TestFacet();

        // Install a custom admin facet.
        serviceManagerCommunicator.AddAdminFacet("TestFacet", facet);

        // The TestFacetI servant also implements PropertiesAdminUpdateCallback. Set the callback on the admin facet.
        Ice.IObject?propFacet = serviceManagerCommunicator.FindAdminFacet("IceBox.Service.TestService.Properties");
        if (propFacet is Ice.IPropertiesAdmin admin)
        {
            admin.Updated += (_, updates) => facet.Updated(updates);
        }
    }
Esempio n. 2
0
    public TestService(Ice.Communicator serviceManagerCommunicator)
    {
        var facet = new TestFacet();

        //
        // Install a custom admin facet.
        //
        serviceManagerCommunicator.AddAdminFacet(facet, "TestFacet");

        //
        // The TestFacetI servant also implements PropertiesAdminUpdateCallback.
        // Set the callback on the admin facet.
        //
        Ice.IObject?propFacet = serviceManagerCommunicator.FindAdminFacet("IceBox.Service.TestService.Properties");
        if (propFacet != null)
        {
            var admin = (Ice.INativePropertiesAdmin)propFacet;
            admin.AddUpdateCallback(facet.updated);
        }
    }
Esempio n. 3
0
    public TestServiceI(Ice.Communicator serviceManagerCommunicator)
    {
        TestFacetI facet = new TestFacetI();

        //
        // Install a custom admin facet.
        //
        serviceManagerCommunicator.AddAdminFacet <TestFacet, TestFacetTraits>(facet, "TestFacet");

        //
        // The TestFacetI servant also implements PropertiesAdminUpdateCallback.
        // Set the callback on the admin facet.
        //
        object propFacet = serviceManagerCommunicator.FindAdminFacet("IceBox.Service.TestService.Properties").servant;

        if (propFacet != null)
        {
            Ice.NativePropertiesAdmin admin = (Ice.NativePropertiesAdmin)propFacet;
            admin.addUpdateCallback(facet.updated);
        }
    }