Ejemplo n.º 1
0
        /// <summary>
        /// Sets the <see cref="PublisherListener" />.
        /// </summary>
        /// <param name="listener">The <see cref="PublisherListener" /> to be set.</param>
        /// <param name="mask">The <see cref="StatusMask" /> of which status changes the listener should be notified.</param>
        /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns>
        public ReturnCode SetListener(PublisherListener listener, StatusMask mask)
        {
            Listener = listener;
            IntPtr ptr = IntPtr.Zero;

            if (listener != null)
            {
                ptr = listener.ToNative();
            }

            return(UnsafeNativeMethods.SetListener(_native, ptr, mask));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the <see cref="PublisherListener" /> using the <see cref="StatusMask.DefaultStatusMask" />.
 /// </summary>
 /// <param name="listener">The <see cref="PublisherListener" /> to be set.</param>
 /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns>
 public ReturnCode SetListener(PublisherListener listener)
 {
     return(SetListener(listener, StatusMask.DefaultStatusMask));
 }