コード例 #1
0
        public LocationHolderT UnPack()
        {
            var _o = new LocationHolderT();

            this.UnPackTo(_o);
            return(_o);
        }
コード例 #2
0
 public void UnPackTo(LocationHolderT _o)
 {
     _o.SingleLocation = this.SingleLocation.HasValue ? this.SingleLocation.Value.UnPack() : null;
     _o.Fake           = this.Fake;
     _o.LocationVector = new List <FlatSharpTests.Oracle.LocationT>();
     for (var _j = 0; _j < this.LocationVectorLength; ++_j)
     {
         _o.LocationVector.Add(this.LocationVector(_j).HasValue ? this.LocationVector(_j).Value.UnPack() : null);
     }
 }
コード例 #3
0
        public static Offset <FlatSharpTests.Oracle.LocationHolder> Pack(FlatBufferBuilder builder, LocationHolderT _o)
        {
            if (_o == null)
            {
                return(default(Offset <FlatSharpTests.Oracle.LocationHolder>));
            }
            var _Fake           = _o.Fake == null ? default(StringOffset) : builder.CreateString(_o.Fake);
            var _LocationVector = default(VectorOffset);

            if (_o.LocationVector != null)
            {
                StartLocationVectorVector(builder, _o.LocationVector.Count);
                for (var _j = _o.LocationVector.Count - 1; _j >= 0; --_j)
                {
                    FlatSharpTests.Oracle.Location.Pack(builder, _o.LocationVector[_j]);
                }
                _LocationVector = builder.EndVector();
            }
            StartLocationHolder(builder);
            AddSingleLocation(builder, FlatSharpTests.Oracle.Location.Pack(builder, _o.SingleLocation));
            AddFake(builder, _Fake);
            AddLocationVector(builder, _LocationVector);
            return(EndLocationHolder(builder));
        }