Example #1
0
        public override Empty TestMapped1State(ProtobufInput input)
        {
            var protobufMessage = State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue];

            if (protobufMessage == null)
            {
                State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue] =
                    new ProtobufMessage()
                {
                    BoolValue   = true,
                    Int64Value  = input.ProtobufValue.Int64Value,
                    StringValue = input.ProtobufValue.StringValue
                };
            }
            else
            {
                State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue] =
                    new ProtobufMessage
                {
                    BoolValue  = true,
                    Int64Value = State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue]
                                 .Int64Value
                                 .Add(input.ProtobufValue.Int64Value),
                    StringValue = input.ProtobufValue.StringValue
                };
            }

            return(new Empty());
        }
Example #2
0
        public override ProtobufListOutput TestMappedState(ProtobufInput input)
        {
            var protobufMessage = State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue];

            if (protobufMessage == null)
            {
                State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue] =
                    new ProtobufMessage()
                {
                    BoolValue   = true,
                    Int64Value  = input.ProtobufValue.Int64Value,
                    StringValue = input.ProtobufValue.StringValue
                };
            }
            else
            {
                State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue].Int64Value =
                    input.ProtobufValue.Int64Value;
            }

            return(new ProtobufListOutput
            {
                Collection = { input.ProtobufValue }
            });
        }
        public override ProtobufMessage QueryMappedState2(ProtobufInput input)
        {
            var message = State.Complex4Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue][
                input.ProtobufValue.StringValue];

            return(message ?? new ProtobufMessage());
        }
Example #4
0
        public override ProtobufOutput TestProtobufState(ProtobufInput input)
        {
            State.ProtoInfo.Value = input.ProtobufValue;

            return(new ProtobufOutput()
            {
                ProtobufValue = State.ProtoInfo.Value
            });
        }
Example #5
0
        public override ProtobufMessage QueryMappedState1(ProtobufInput input)
        {
            var result = State.Complex3Info[input.ProtobufValue.Int64Value][input.ProtobufValue.StringValue];

            if (result == null)
            {
                return(new ProtobufMessage());
            }

            return(result);
        }
Example #6
0
        public override Empty TestProtobufState(ProtobufInput input)
        {
            State.ProtoInfo2.Value = input.ProtobufValue;

            return(new Empty());
        }
        public override ProtobufMessage QueryMappedState(ProtobufInput input)
        {
            var message = State.MappedState[input.ProtobufValue.Int64Value];

            return(message ?? new ProtobufMessage());
        }