Created
February 23, 2018 19:59
-
-
Save teedty1/2ca34af1910abe1e6bf22ff34d6888e4 to your computer and use it in GitHub Desktop.
Orleans Test Problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Nest; | |
using Orleans; | |
namespace Test | |
{ | |
public interface ITestGrain : Orleans.IGrainWithIntegerKey | |
{ | |
Task<TestObject> Get(); | |
} | |
class TestGrain : Grain, ITestGrain | |
{ | |
public Task<TestObject> Get() | |
{ | |
var toc = new TestObjectChild(); | |
return Task.FromResult((TestObject)toc); | |
} | |
} | |
[Serializable] | |
public class TestObject | |
{ | |
public TestProperty Prop { get; set; } | |
} | |
[Serializable] | |
public class TestObjectChild : TestObject | |
{ | |
public new exTestProperty Prop | |
{ | |
get { return (exTestProperty)base.Prop; } | |
set { base.Prop = value; } | |
} | |
} | |
[Serializable] | |
public class TestProperty | |
{ | |
public int IntProp { get; set; } | |
public string StringProp { get; set; } | |
} | |
[Serializable] | |
public class exTestProperty : TestProperty | |
{ | |
public int StringProp2 { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment