public async Task <JsonResult> GetAdvertising(string imageId) { AdvertisingResult adResult = new AdvertisingResult(); var ad = _advertisingService.GetAdvertising(imageId); if (ad?.ExpirationDate <= DateTime.Now) { await _advertisingService.RemoveAdvertisingAsync(ad); adResult.Exist = false; } else { if (ad.ImageUrl != null) { adResult.Exist = true; adResult.Ad = ad; } } return(Json(adResult, JsonRequestBehavior.DenyGet)); }
internal void OnAdvertisingResult(AdvertisingResult result) { mNearbyStatus = "AdvertisingResult: success:" + result.Succeeded + " " + result.LocalEndpointName; }
/// <summary> /// Raises the advertising result event. /// </summary> /// <param name="result">Result of the call.</param> internal void OnAdvertisingResult(AdvertisingResult result) { Debug.Log("OnAdvertisingResult: " + result); }