Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FacebookAdapter"/> class using an existing Facebook client.
 /// </summary>
 /// /// <param name="facebookClient">Client used to interact with the Facebook API.</param>
 /// <param name="options">Options for the Facebook Adapter.</param>
 /// <param name="logger">The logger this adapter should use.</param>
 /// <exception cref="ArgumentNullException"><paramref name="options"/> is null.</exception>
 public FacebookAdapter(FacebookClientWrapper facebookClient, FacebookAdapterOptions options, ILogger logger = null)
 {
     _options        = options ?? new FacebookAdapterOptions();
     _facebookClient = facebookClient ?? throw new ArgumentNullException(nameof(facebookClient));
     _logger         = logger ?? NullLogger.Instance;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FacebookAdapter"/> class.
 /// Creates a Facebook adapter.
 /// </summary>
 /// <param name="facebookClient">A Facebook API interface.</param>
 public FacebookAdapter(FacebookClientWrapper facebookClient)
 {
     _facebookClient = facebookClient ?? throw new ArgumentNullException(nameof(facebookClient));
 }