private void creative_RunCompleted(Creative creative, bool success)
        {
            runningCreatives.Remove(creative);
            creative.RunCompleted -= creative_RunCompleted;
            if (!success && FailureStrategy != FailurePolicyEnum.Ignore)
            {
                Cleanup();
                OnCompleted(success);
            }
            else
            {
                if (requiredCreatives.Contains(creative))
                {
                    requiredCreatives.Remove(creative);
                }

                if (!runningCreatives.Any())
                {
                    // we're done
                    Cleanup();
                    OnCompleted(success);
                }
                else if (!requiredCreatives.Any())
                {
                    // we're done with the required creatives.
                    SoftCleanup();
                    OnCompleted(success);
                }
            }
        }
 private void creative_RunCompleted(Creative creative, bool success)
 {
     var vastAdCreative = (VastCreative)creative;
     if (success)
         SendLogEntry(LogEntryTypes.CreativeSucceeded, LogLevel.Information, string.Format(VastAdHandlerResources.CreativeSucceeded, vastAdCreative.Id));
     else
         SendLogEntry(LogEntryTypes.CreativeFailed, LogLevel.Error, string.Format(VastAdHandlerResources.CreativeFailed, vastAdCreative.Id));
 }
Пример #3
0
        private void creative_RunCompleted(Creative creative, bool success)
        {
            var adCreative = (UACCreative)creative;

            if (success)
                SendLogEntry(LogEntryTypes.CreativeSucceeded, Microsoft.SilverlightMediaFramework.Plugins.Primitives.LogLevel.Information, string.Format(VastAdHandlerResources.CreativeSucceeded, adCreative.Id));
            else
                SendLogEntry(LogEntryTypes.CreativeFailed, Microsoft.SilverlightMediaFramework.Plugins.Primitives.LogLevel.Error, string.Format(VastAdHandlerResources.CreativeFailed, adCreative.Id));
        }