/// <summary> /// Sets a default value of the <see cref="DataReader" /> QoS policies which will be used for newly created <see cref="DataReader" /> entities /// in the case where the QoS policies are defaulted in the CreateDataReader operation. /// </summary> /// <remarks> /// This operation will check that the resulting policies are self consistent; if they are not, the operation will have no effect and /// return <see cref="ReturnCode.InconsistentPolicy" />. /// </remarks> /// <param name="qos">The default <see cref="DataReaderQos" /> to be set.</param> /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns> public ReturnCode SetDefaultDataReaderQos(DataReaderQos qos) { if (qos is null) { return(ReturnCode.BadParameter); } var qosNative = qos.ToNative(); var ret = UnsafeNativeMethods.SetDefaultDataReaderQos(_native, qosNative); qos.Release(); return(ret); }
/// <summary> /// Gets the <see cref="DataReader" /> QoS policies. /// </summary> /// <param name="qos">The <see cref="DataReaderQos" /> to be filled up.</param> /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns> public ReturnCode GetQos(DataReaderQos qos) { if (qos == null) { return(ReturnCode.BadParameter); } DataReaderQosWrapper qosWrapper = default; var ret = UnsafeNativeMethods.GetQos(_native, ref qosWrapper); if (ret == ReturnCode.Ok) { qos.FromNative(qosWrapper); } qos.Release(); return(ret); }