Skip to content

Instantly share code, notes, and snippets.

@teedty1
Created February 23, 2018 19:59
Show Gist options
  • Save teedty1/2ca34af1910abe1e6bf22ff34d6888e4 to your computer and use it in GitHub Desktop.
Save teedty1/2ca34af1910abe1e6bf22ff34d6888e4 to your computer and use it in GitHub Desktop.
Orleans Test Problem
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