コード例 #1
0
ファイル: GrainServiceTests.cs プロジェクト: zpple/orleans
        public async Task SimpleInvokeGrainService()
        {
            IGrainServiceTestGrain grain = this.GrainFactory.GetGrain <IGrainServiceTestGrain>(0);
            var grainId = await grain.GetHelloWorldUsingCustomService();

            Assert.Equal("Hello World from Test Grain Service", grainId);
            var prop = await grain.GetServiceConfigProperty();

            Assert.Equal("abc", prop);
        }
コード例 #2
0
        public async Task SimpleInvokeGrainService()
        {
            // We need to get the Silo to create the GrainService instances and register them as SystemTargets.

            IGrainServiceTestGrain grain = GrainFactory.GetGrain <IGrainServiceTestGrain>(0);
            var grainId = await grain.GetHelloWorldUsingCustomService();

            Assert.Equal("Hello World from Grain Service", grainId);
            var prop = await grain.GetServiceConfigProperty("test-property");

            Assert.Equal("xyz", prop);
        }