public void MoreEmpty()
        {
            var e1  = new Empty1();
            var e2  = new Empty2();
            var ne1 = new NonEmpty1();
            var ne2 = new NonEmpty2();

            MessagePackSerializer.ToJson(e1).Is("[]");
            MessagePackSerializer.ToJson(e2).Is("{}");
            MessagePackSerializer.ToJson(ne1).Is("[0]");
            MessagePackSerializer.ToJson(ne2).Is(@"{""MyProperty"":0}");
        }
Exemplo n.º 2
0
 internal PacketCounter(Empty1 empty1)
 {
 }
Exemplo n.º 3
0
        protected override void UpdateThisNative()
        {
            base.UpdateThisNative();

            Configuration.Layout.LayoutOffset = Parent.Configuration.Layout.LayoutOffset;
            int limit = Parent.Configuration.Layout.OffsetLimit;

            Slider.Style.WallColor = ScrollBarStyle.SliderColor;
            if (Vertical)
            {
                int size = Math.Max(Height - limit, 1);
                if (size >= Height)
                {
                    Slider.Disable();
                    Configuration.UseBegin = false;
                    return;
                }
                else
                {
                    Slider.Enable();
                    Configuration.UseBegin = true;
                }
                Slider.SetWH(_Width, size);
                Empty1.SetWH(_Width, Height - Slider.Height);
                Empty2.SetWH(_Width, limit);
            }
            else
            {
                int size = Math.Max(Width - limit, 1);
                if (size >= Width)
                {
                    Slider.Disable();
                    Configuration.UseBegin = false;
                    return;
                }
                else
                {
                    Slider.Enable();
                    Configuration.UseBegin = true;
                }
                Slider.SetWH(size, _Width);
                Empty1.SetWH(Width - Slider.Width, _Width);
                Empty2.SetWH(limit, _Width);
            }
            ForceSection = Parent.ForceSection;
            switch (Parent.Configuration.Layout.Direction)
            {
            case Direction.Left:
                Configuration.Layout.Alignment = Alignment.Right;
                Configuration.Layout.Direction = Direction.Right;
                break;

            case Direction.Up:
                Configuration.Layout.Alignment = Alignment.Down;
                Configuration.Layout.Direction = Direction.Down;
                break;

            case Direction.Right:
                Configuration.Layout.Alignment = Alignment.Left;
                Configuration.Layout.Direction = Direction.Left;
                break;

            case Direction.Down:
                Configuration.Layout.Alignment = Alignment.Up;
                Configuration.Layout.Direction = Direction.Up;
                break;
            }
        }
Exemplo n.º 4
0
 public EmptyChain List(Empty1 e1)
 {
     return(new EmptyChain());
 }
Exemplo n.º 5
0
 internal PacketCounter(Empty1 empty1)
 {
 }