StackStoreFactory.cs
1 using System;
2 
4 
5 namespace Microsoft.Bot.Builder.Internals.Fibers
6 {
7 
8  public interface IStackStoreFactory<C>
9  {
10  IStore<IFiberLoop<C>> StoreFrom(string taskId, IBotDataBag dataBag);
11  }
12 
13  public sealed class StoreFromStack<C> : IStackStoreFactory<C>
14  {
15  private readonly Func<string, IBotDataBag, IStore<IFiberLoop<C>>> make;
16 
17  public StoreFromStack(Func<string, IBotDataBag, IStore<IFiberLoop<C>>> make)
18  {
19  SetField.NotNull(out this.make, nameof(make), make);
20  }
22  {
23  return this.make(stackId, dataBag);
24  }
25  }
26 }
StoreFromStack(Func< string, IBotDataBag, IStore< IFiberLoop< C >>> make)
IStore< IFiberLoop< C > > StoreFrom(string taskId, IBotDataBag dataBag)
A property bag of bot data.
Definition: IBotDataBag.cs:41
Core namespace for Dialogs and associated infrastructure.
Root namespace for the Microsoft Bot Builder SDK.