/// <summary> /// Extends BeginReceiveFromSource so that buffer offset of 0 and call to Array.Length are not needed. /// <example> /// udpsinglesourcemulticastclient.BeginReceiveFromSource(buffer, callback); /// </example> /// </summary> public static IAsyncResult BeginReceiveFromSource(this UdpSingleSourceMulticastClient udpsinglesourcemulticastclient, Byte[] buffer, AsyncCallback callback) { if(udpsinglesourcemulticastclient == null) throw new ArgumentNullException("udpsinglesourcemulticastclient"); if(buffer == null) throw new ArgumentNullException("buffer"); return udpsinglesourcemulticastclient.BeginReceiveFromSource(buffer, 0, buffer.Length, callback); }
/// <summary> /// Extends BeginReceiveFromSource so that when a state object is not needed, null does not need to be passed. /// <example> /// udpsinglesourcemulticastclient.BeginReceiveFromSource(buffer, offset, count, callback); /// </example> /// </summary> public static IAsyncResult BeginReceiveFromSource(this UdpSingleSourceMulticastClient udpsinglesourcemulticastclient, Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback) { if(udpsinglesourcemulticastclient == null) throw new ArgumentNullException("udpsinglesourcemulticastclient"); return udpsinglesourcemulticastclient.BeginReceiveFromSource(buffer, offset, count, callback, null); }