コード例 #1
0
        //
        // ScatterGatherFirstCompletedPool
        //
        private byte[] ScatterGatherFirstCompletedPoolToProto(ScatterGatherFirstCompletedPool scatterGatherFirstCompletedPool)
        {
            var message = new Proto.Msg.ScatterGatherPool();

            message.Generic = GenericRoutingPoolBuilder(scatterGatherFirstCompletedPool);
            message.Within  = Google.Protobuf.WellKnownTypes.Duration.FromTimeSpan(scatterGatherFirstCompletedPool.Within);
            return(message.ToByteArray());
        }
コード例 #2
0
        public void CanSerializeScatterGatherFirstCompletedPool()
        {
            var decider = Decider.From(
             Directive.Restart,
             Directive.Stop.When<ArgumentException>(),
             Directive.Stop.When<NullReferenceException>());

            var supervisor = new OneForOneStrategy(decider);

            var message = new ScatterGatherFirstCompletedPool(10, null, supervisor, "abc", TimeSpan.MaxValue);
            AssertEqual(message);
        }
コード例 #3
0
        public void Can_serialize_ScatterGatherFirstCompletedPool()
        {
            var message = new ScatterGatherFirstCompletedPool(nrOfInstances: 25, within: 3.Seconds());

            AssertEqual(message);
        }
コード例 #4
0
        public void CanSerializeScatterGatherFirstCompletedPool()
        {
            var message = new ScatterGatherFirstCompletedPool(10);

            AssertEqual(message);
        }