public void TestDeployKeyAffinitySingletonPortable() { var services = Services.WithKeepPortable(); var svc = new TestIgniteServicePortable(); var affKey = new PortableObject { Val = AffKey }; services.DeployKeyAffinitySingleton(SvcName, svc, CacheName, affKey); var prx = services.GetServiceProxy <ITestIgniteService>(SvcName); Assert.IsTrue(prx.Initialized); }
public void TestWithKeepPortableBoth() { var svc = new TestIgniteServicePortable(); // Deploy to grid2 Grid1.Cluster.ForNodeIds(Grid2.Cluster.LocalNode.Id).Services().WithKeepPortable().WithServerKeepPortable() .DeployNodeSingleton(SvcName, svc); // Get proxy var prx = Services.WithKeepPortable().WithServerKeepPortable().GetServiceProxy <ITestIgniteService>(SvcName); var obj = new PortableObject { Val = 11 }; var res = (IPortableObject)prx.Method(obj); Assert.AreEqual(11, res.Deserialize <PortableObject>().Val); res = (IPortableObject)prx.Method(Grid1.Portables().ToPortable <IPortableObject>(obj)); Assert.AreEqual(11, res.Deserialize <PortableObject>().Val); }
public void TestWithKeepPortableBoth() { var svc = new TestIgniteServicePortable(); // Deploy to grid2 Grid1.Cluster.ForNodeIds(Grid2.Cluster.LocalNode.Id).Services().WithKeepPortable().WithServerKeepPortable() .DeployNodeSingleton(SvcName, svc); // Get proxy var prx = Services.WithKeepPortable().WithServerKeepPortable().GetServiceProxy<ITestIgniteService>(SvcName); var obj = new PortableObject { Val = 11 }; var res = (IPortableObject)prx.Method(obj); Assert.AreEqual(11, res.Deserialize<PortableObject>().Val); res = (IPortableObject)prx.Method(Grid1.Portables().ToPortable<IPortableObject>(obj)); Assert.AreEqual(11, res.Deserialize<PortableObject>().Val); }
public void TestDeployKeyAffinitySingletonPortable() { var services = Services.WithKeepPortable(); var svc = new TestIgniteServicePortable(); var affKey = new PortableObject {Val = AffKey}; services.DeployKeyAffinitySingleton(SvcName, svc, CacheName, affKey); var prx = services.GetServiceProxy<ITestIgniteService>(SvcName); Assert.IsTrue(prx.Initialized); }