示例#1
0
        public ImageT UnPack()
        {
            var _o = new ImageT();

            this.UnPackTo(_o);
            return(_o);
        }
示例#2
0
        public void UnPackTo(ImageT _o)
        {
            _o.Data      = new hyperionnet.ImageTypeUnion();
            _o.Data.Type = this.DataType;
            switch (this.DataType)
            {
            default: break;

            case hyperionnet.ImageType.RawImage:
                _o.Data.Value = this.Data <hyperionnet.RawImage>().HasValue ? this.Data <hyperionnet.RawImage>().Value.UnPack() : null;
                break;
            }
            _o.Duration = this.Duration;
        }
示例#3
0
        public static Offset <hyperionnet.Image> Pack(FlatBufferBuilder builder, ImageT _o)
        {
            if (_o == null)
            {
                return(default(Offset <hyperionnet.Image>));
            }
            var _data_type = _o.Data == null ? hyperionnet.ImageType.NONE : _o.Data.Type;
            var _data      = _o.Data == null ? 0 : hyperionnet.ImageTypeUnion.Pack(builder, _o.Data);

            return(CreateImage(
                       builder,
                       _data_type,
                       _data,
                       _o.Duration));
        }