public static Offset <NymaTypes.NPortInfo> Pack(FlatBufferBuilder builder, NPortInfoT _o) { if (_o == null) { return(default(Offset <NymaTypes.NPortInfo>)); } var _ShortName = _o.ShortName == null ? default(StringOffset) : builder.CreateString(_o.ShortName); var _FullName = _o.FullName == null ? default(StringOffset) : builder.CreateString(_o.FullName); var _DefaultDeviceShortName = _o.DefaultDeviceShortName == null ? default(StringOffset) : builder.CreateString(_o.DefaultDeviceShortName); var _Devices = default(VectorOffset); if (_o.Devices != null) { var __Devices = new Offset <NymaTypes.NDeviceInfo> [_o.Devices.Count]; for (var _j = 0; _j < __Devices.Length; ++_j) { __Devices[_j] = NymaTypes.NDeviceInfo.Pack(builder, _o.Devices[_j]); } _Devices = CreateDevicesVector(builder, __Devices); } return(CreateNPortInfo( builder, _ShortName, _FullName, _DefaultDeviceShortName, _Devices)); }
public NPortInfoT UnPack() { var _o = new NPortInfoT(); this.UnPackTo(_o); return(_o); }
public void UnPackTo(NPortInfoT _o) { _o.ShortName = this.ShortName; _o.FullName = this.FullName; _o.DefaultDeviceShortName = this.DefaultDeviceShortName; _o.Devices = new List <NymaTypes.NDeviceInfoT>(); for (var _j = 0; _j < this.DevicesLength; ++_j) { _o.Devices.Add(this.Devices(_j).HasValue ? this.Devices(_j).Value.UnPack() : null); } }