internal void FromNative(SubscriberQosWrapper 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="Subscriber" /> QoS policies. /// </summary> /// <param name="qos">The <see cref="SubscriberQos" /> to be filled up.</param> /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns> public ReturnCode GetQos(SubscriberQos qos) { if (qos == null) { return(ReturnCode.BadParameter); } SubscriberQosWrapper qosWrapper = default; var ret = UnsafeNativeMethods.GetQos(_native, ref qosWrapper); if (ret == ReturnCode.Ok) { qos.FromNative(qosWrapper); } qos.Release(); return(ret); }
internal SubscriberQosWrapper ToNative() { var data = new SubscriberQosWrapper { 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 sub, [MarshalAs(UnmanagedType.Struct), In] SubscriberQosWrapper qos);