Esempio n. 1
0
 /// <summary>
 /// Converts an existing <see cref="SocketVoiceServer"/> to an abstracted <see cref="ISocketVoiceServer"/> value.
 /// </summary>
 /// <param name="socketVoiceServer">The existing <see cref="SocketVoiceServer"/> to be abstracted.</param>
 /// <exception cref="ArgumentNullException">Throws for <paramref name="socketVoiceServer"/>.</exception>
 /// <returns>An <see cref="ISocketVoiceServer"/> that abstracts <paramref name="socketVoiceServer"/>.</returns>
 public static ISocketVoiceServer Abstract(this SocketVoiceServer socketVoiceServer)
 => new SocketVoiceServerAbstraction(socketVoiceServer);
Esempio n. 2
0
 /// <summary>
 /// Constructs a new <see cref="SocketVoiceServerAbstraction"/> around an existing <see cref="WebSocket.SocketVoiceServer"/>.
 /// </summary>
 /// <param name="socketVoiceServer">The value to use for <see cref="WebSocket.SocketVoiceServer"/>.</param>
 /// <exception cref="ArgumentNullException">Throws for <paramref name="socketVoiceServer"/>.</exception>
 public SocketVoiceServerAbstraction(SocketVoiceServer socketVoiceServer)
 {
     SocketVoiceServer = socketVoiceServer ?? throw new ArgumentNullException(nameof(socketVoiceServer));
 }