Пример #1
0
 /// <summary>
 /// Registers the NendAdNativeView.
 /// </summary>
 /// <param name="view">NendAdNativeView</param>
 public void RegisterAdView(NendAdNativeView view)
 {
     if (null != view && views.All(v => v != view))
     {
         views = views.Concat(new NendAdNativeView[] { view }).ToArray();
     }
 }
Пример #2
0
 private void PostAdFailedToReceive(NendAdNativeView view, int code, string message)
 {
     if (null != AdFailedToReceive)
     {
         AdFailedToReceive.Invoke(view, code, message);
     }
 }
Пример #3
0
 private void PostAdLoaded(NendAdNativeView view)
 {
     if (null != AdLoaded)
     {
         AdLoaded.Invoke(view);
     }
 }
Пример #4
0
 public void Into(NendAdNativeView adView)
 {
     if (null == adView)
     {
         throw new ArgumentNullException("`NendAdNativeView` must not be null.");
     }
     adView.RenderAd(this);
 }
Пример #5
0
 /// <summary>
 /// Unregisters the NendAdNativeView.
 /// </summary>
 /// <param name="view">NendAdNativeView</param>
 public void UnregisterAdView(NendAdNativeView view)
 {
     if (null != view)
     {
         var index = Array.IndexOf(views, view);
         if (-1 != index)
         {
             Array.Clear(views, index, 1);
         }
     }
 }