Exemplo n.º 1
0
 public object GetContent(string path, Type type)
 {
     if (ShouldLoadFromBundle(path))
     {
         return(_includedAssets.GetContent(path.Substring(ASSET_BUNDLE_RELATIVE_PATH.Length), type));
     }
     else
     {
         return(_contentLoader.LoadContent(System.IO.Path.Combine(Path, path), type));
     }
 }
 /// <summary>
 ///     Append all content to _uiContent, including Integration Code iff it should be included.
 /// </summary>
 /// <param name="contentLoader"></param>
 private void AppendContent(IContentLoader contentLoader)
 {
     if (IncludeIntegrationCode)
     {
         _uiContent.Append(GetIntegrationCode());
     }
     _uiContent.Append(contentLoader.LoadContent(SeoContentUrl));
     BVUtility.replacePageURIFromContent(_uiContent, CorrectedBaseUri);
 }
Exemplo n.º 3
0
        public async Task <EventsObject> LoadAndSaveData()
        {
            EventsObject apiEvents;

            try
            {
                apiEvents = await _contentLoader.LoadContent();

                await _eventCacheService.Save <EventsObject>(apiEvents);

                _logger.LogInformation("Events Loaded and saved successfully");
            }
            catch (Exception ex)
            {
                _logger.LogError("EventDataHandler - LoadAndSaveData " + ex.StackTrace);
                throw;
            }
            return(apiEvents);
        }
Exemplo n.º 4
0
        public override void LoadSound(SoundID sound)
        {
            if (instances.ContainsKey(sound))
            {
                return;
            }

            var soundContent = soundLoader.LoadContent(sound);

            SoundBank.SetMapping(sound, soundContent);
            instances.Add(sound, new List <SoundEffectInstance>());
        }
 /// <summary>
 ///     Append all content to _uiContent, including Integration Code iff it should be included.
 /// </summary>
 /// <param name="contentLoader"></param>
 private void AppendContent(IContentLoader contentLoader)
 {
     if (IncludeIntegrationCode)
     {
         _uiContent.Append(GetIntegrationCode());
     }
     _uiContent.Append(contentLoader.LoadContent(SeoContentUrl));
     BVUtility.replacePageURIFromContent(_uiContent, CorrectedBaseUri);
 }