/// <summary>
        /// Construct my final state with the <see cref="IStateStore"/>, which must
        /// be provided by my concrete extenders, as well as with a
        /// <see cref="IStateAdapter"/> and a <see cref="IEntryAdapter{TSource,TEntry}"/>.
        /// </summary>
        /// <param name="stateStore">The <see cref="IStateStore"/> from which previous state is read and merged current state is written</param>
        /// <param name="stateAdapter">The <see cref="IStateAdapter"/> used by my extenders to adapt persistent state</param>
        /// <param name="entryAdapter">The <see cref="IEntryAdapter{TSource,TEntry}"/> used by my extenders to adapt persistent entries</param>
        public StateStoreProjectionActor(IStateStore stateStore, IStateAdapter stateAdapter, IEntryAdapter entryAdapter)
        {
            _stateStore    = stateStore;
            _stateAdapter  = stateAdapter;
            _entryAdapter  = entryAdapter;
            _readInterest  = SelfAs <IReadResultInterest>();
            _writeInterest = SelfAs <IWriteResultInterest>();

            _adaptedSources = new List <ISource>();
        }
예제 #2
0
 public HomeController()
 {
     _EntryAdapter = EntryService.Instance.Adapter;
 }
예제 #3
0
 public Info RegisterEntryAdapter <TSource, TEntry>(IEntryAdapter <TSource, TEntry> adapter, Action <IEntryAdapter <TSource, TEntry> > consumer) where TSource : ISource where TEntry : IEntry
 {
     EntryAdapterProvider.RegisterAdapter(adapter, consumer);
     return(this);
 }