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
// Events | |
public class PersonRegistered | |
{ | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
public GenderType Gender { get; set; } | |
} | |
public class PersonMarried | |
{ |
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 Microsoft.Practices.TransientFaultHandling; | |
public class RavenDBTransientErrorDetectionStrategy : ITransientErrorDetectionStrategy | |
{ | |
public bool IsTransient(Exception ex) | |
{ | |
dynamic currentException = ex; | |
while(currentException != null) | |
{ |
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.Threading.Tasks; | |
using Orleans; | |
namespace MyApp | |
{ | |
public class MyState | |
{ | |
public string Foo { get; set; } | |
public int Bar { get; set; } | |
} |
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
/* | |
https://github.com/dotnet/orleans/blob/master/src/OrleansEventSourcing/JournaledGrainState.cs | |
The example from Orleans repo uses existing providers to store the event stream as List<Event>. | |
This is not needed when using StreamStone - instead of using existing providers and calling WriteStateAsync() you can read / write yourself | |
*/ | |
// 1. Define class that will be used by StreamStone to represent event row | |
public class EventEntity : TableEntity | |
{ |