Exemplo n.º 1
0
        public override object Create(MaterializationContext context, out NotUsed materializer)
        {
            var actorMaterializer = ActorMaterializer.Downcast(context.Materializer);
            var effectiveSettings = actorMaterializer.EffectiveSettings(context.EffectiveAttributes);
            var subscriberRef     = actorMaterializer.ActorOf(context,
                                                              ActorRefSinkActor.Props(_ref, effectiveSettings.MaxInputBufferSize, _onCompleteMessage));

            materializer = null;
            return(new ActorSubscriberImpl <TIn>(subscriberRef));
        }
Exemplo n.º 2
0
        public void NotUsedRule()
        {
            Soup soup = new Soup {
                UsedWords = new Dictionary <string, WordEntry> {
                    { "Word1", new WordEntry {
                          X = 1, Y = 1, Direction = Directions.E, Name = "Word1"
                      } },
                    { "Word2", new WordEntry {
                          X = 1, Y = 1, Direction = Directions.E, Name = "Word2"
                      } }
                }
            };
            IRule rule = new NotUsed();

            Assert.False(rule.Check(soup, new WordEntry {
                X = 2, Y = 2, Direction = Directions.W, Name = "Word2"
            }));
        }
Exemplo n.º 3
0
 public override object Create(MaterializationContext context, out NotUsed materializer)
 {
     materializer = NotUsed.Instance;
     return(new CancellingSubscriber <T>());
 }
Exemplo n.º 4
0
 public override object Create(MaterializationContext context, out NotUsed materializer)
 {
     materializer = NotUsed.Instance;
     return(_subscriber);
 }
Exemplo n.º 5
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="context">TBD</param>
 /// <param name="materializer">TBD</param>
 /// <returns>TBD</returns>
 public override IPublisher <TOut> Create(MaterializationContext context, out NotUsed materializer)
 {
     materializer = NotUsed.Instance;
     return(_publisher);
 }