internal void FromNative(PublisherQosWrapper wrapper) { Presentation = wrapper.Presentation; EntityFactory = wrapper.EntityFactory; if (GroupData == null) { GroupData = new GroupDataQosPolicy(); } GroupData.FromNative(wrapper.GroupData); if (Partition == null) { Partition = new PartitionQosPolicy(); } Partition.FromNative(wrapper.Partition); }
/// <summary> /// Gets the <see cref="Publisher" /> QoS policies. /// </summary> /// <param name="qos">The <see cref="PublisherQos" /> to be filled up.</param> /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns> public ReturnCode GetQos(PublisherQos qos) { if (qos == null) { return(ReturnCode.BadParameter); } PublisherQosWrapper qosWrapper = default; var ret = UnsafeNativeMethods.GetQos(_native, ref qosWrapper); if (ret == ReturnCode.Ok) { qos.FromNative(qosWrapper); } qos.Release(); return(ret); }
internal PublisherQosWrapper ToNative() { var data = new PublisherQosWrapper { Presentation = Presentation, EntityFactory = EntityFactory, }; if (GroupData != null) { data.GroupData = GroupData.ToNative(); } if (Partition != null) { data.Partition = Partition.ToNative(); } return(data); }
public static extern ReturnCode SetQos(IntPtr pub, [MarshalAs(UnmanagedType.Struct), In] PublisherQosWrapper qos);