Aurora.DefaultLibraryLoaders.DefaultAssetXMLLoader.LoadLibrary C# (CSharp) Метод

LoadLibrary() публичный Метод

public LoadLibrary ( ILibraryService service, IConfigSource source, IRegistryCore registry ) : void
service ILibraryService
source IConfigSource
registry IRegistryCore
Результат void
        public void LoadLibrary(ILibraryService service, IConfigSource source, IRegistryCore registry)
        {
            m_service = service;

            IConfig assetConfig = source.Configs["DefaultXMLAssetLoader"];
            if (assetConfig == null){
                return;
            }
            string loaderArgs = assetConfig.GetString("AssetLoaderArgs",
                        String.Empty);
            bool assetLoaderEnabled = !assetConfig.GetBoolean("PreviouslyLoaded", false);

            if (!assetLoaderEnabled)
                return;

            registry.RegisterModuleInterface<DefaultAssetXMLLoader>(this);

            MainConsole.Instance.InfoFormat("[DefaultXMLAssetLoader]: Loading default asset set from {0}", loaderArgs);
            IAssetService assetService = registry.RequestModuleInterface<IAssetService>();
            ForEachDefaultXmlAsset(loaderArgs,
                    delegate(AssetBase a)
                    {
                        if (!assetLoaderEnabled && assetService.GetExists(a.IDString))
                            return;
                        assetService.Store(a);
                    });
        }