示例#1
0
        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));
        }
示例#2
0
 internal void OnAdvertisingResult(AdvertisingResult result)
 {
     mNearbyStatus = "AdvertisingResult: success:" + result.Succeeded +
                     " " + result.LocalEndpointName;
 }
示例#3
0
 /// <summary>
 /// Raises the advertising result event.
 /// </summary>
 /// <param name="result">Result of the call.</param>
 internal void OnAdvertisingResult(AdvertisingResult result)
 {
     Debug.Log("OnAdvertisingResult: " + result);
 }