public PostgreSqlTransactionalStateStorageFactory(string name, PostgreSqlTransactionalStateOptions options,
                                                   ITypeResolver typeResolver, IGrainFactory grainFactory)
 {
     _name         = name;
     _options      = options;
     _jsonSettings = TransactionalStateFactory.GetJsonSerializerSettings(
         typeResolver,
         grainFactory);
 }
コード例 #2
0
 public PostgreSqlTransactionalStateStorage(StateReference stateReference,
                                            PostgreSqlTransactionalStateOptions options,
                                            JsonSerializerSettings jsonSettings)
 {
     _stateId      = stateReference.ToString();
     _options      = options;
     _jsonSettings = jsonSettings;
     _jsonSettings.TypeNameHandling     = TypeNameHandling.Auto;
     _jsonSettings.DefaultValueHandling = DefaultValueHandling.Include;
     _jsonSettings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
 }
コード例 #3
0
 public PostgreSqlTransactionalStateStorage2(StateReference stateReference,
                                             PostgreSqlTransactionalStateOptions options,
                                             JsonSerializerSettings jsonSettings,
                                             ILogger <PostgreSqlTransactionalStateStorage2 <TState> > logger)
 {
     _stateId      = stateReference.ToString();
     _options      = options;
     _dbExecuter   = new DbExecuter(_options.ConnectionString);
     _jsonSettings = jsonSettings;
     _logger       = logger;
     _jsonSettings.TypeNameHandling     = TypeNameHandling.Auto;
     _jsonSettings.DefaultValueHandling = DefaultValueHandling.Include;
     _jsonSettings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
 }