private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_AssetStoreClient    = container.Resolve <AssetStoreClient>();
            m_AssetStoreCallQueue = container.Resolve <AssetStoreCallQueue>();
        }
        public void ResolveDependencies(ApplicationProxy application,
                                        SelectionProxy selection,
                                        UnityConnectProxy unityConnect,
                                        PackageFiltering packageFiltering,
                                        PackageManagerPrefs packageManagerPrefs,
                                        UpmClient upmClient,
                                        UpmRegistryClient upmRegistryClient,
                                        AssetStoreClient assetStoreClient,
                                        PackageDatabase packageDatabase,
                                        PackageManagerProjectSettingsProxy settingsProxy)
        {
            m_Application         = application;
            m_Selection           = selection;
            m_UnityConnect        = unityConnect;
            m_PackageFiltering    = packageFiltering;
            m_PackageManagerPrefs = packageManagerPrefs;
            m_UpmClient           = upmClient;
            m_UpmRegistryClient   = upmRegistryClient;
            m_AssetStoreClient    = assetStoreClient;
            m_PackageDatabase     = packageDatabase;
            m_SettingsProxy       = settingsProxy;

            foreach (var page in m_SerializedSimplePages)
            {
                page.ResolveDependencies(packageDatabase, packageFiltering);
            }
            foreach (var page in m_SerializedPaginatedPage)
            {
                page.ResolveDependencies(packageDatabase, assetStoreClient, packageFiltering, packageManagerPrefs);
            }
        }
Example #3
0
        protected override void ResolveDependencies()
        {
            base.ResolveDependencies();
            var container = ServicesContainer.instance;

            m_AssetStoreClient    = container.Resolve <AssetStoreClient>();
            m_AssetStoreCallQueue = container.Resolve <AssetStoreCallQueue>();
        }
 public void ResolveDependencies(ApplicationProxy application,
                                 UnityConnectProxy unityConnect,
                                 PackageFiltering packageFiltering,
                                 AssetStoreClient assetStoreClient,
                                 AssetStoreCache assetStoreCache,
                                 PageManager pageManager)
 {
     m_Application      = application;
     m_UnityConnect     = unityConnect;
     m_PackageFiltering = packageFiltering;
     m_AssetStoreClient = assetStoreClient;
     m_AssetStoreCache  = assetStoreCache;
     m_PageManager      = pageManager;
 }
Example #5
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_ResourceLoader            = container.Resolve <ResourceLoader>();
            m_Application               = container.Resolve <ApplicationProxy>();
            m_PackageDatabase           = container.Resolve <PackageDatabase>();
            m_PageManager               = container.Resolve <PageManager>();
            m_PackageManagerPrefs       = container.Resolve <PackageManagerPrefs>();
            m_AssetStoreClient          = container.Resolve <AssetStoreClient>();
            m_AssetStoreDownloadManager = container.Resolve <AssetStoreDownloadManager>();
            m_AssetStoreCache           = container.Resolve <AssetStoreCache>();
            m_AssetStoreCallQueue       = container.Resolve <AssetStoreCallQueue>();
            m_PackageFiltering          = container.Resolve <PackageFiltering>();
        }
        public ServicesContainer()
        {
            // In the constructor we only need to worry about creating a brand new instance.
            // In the case of assembly reload, a deserialize step will automatically happen after the constructor
            // to restore all the serializable states/services and we don't need to worry about that
            m_HttpClientFactory    = new HttpClientFactory();
            m_UnityOAuthProxy      = new UnityOAuthProxy();
            m_SelectionProxy       = new SelectionProxy();
            m_AssetDatabaseProxy   = new AssetDatabaseProxy();
            m_UnityConnectProxy    = new UnityConnectProxy();
            m_ApplicationProxy     = new ApplicationProxy();
            m_EditorAnalyticsProxy = new EditorAnalyticsProxy();
            m_IOProxy       = new IOProxy();
            m_SettingsProxy = new PackageManagerProjectSettingsProxy();
            m_ClientProxy   = new ClientProxy();

            m_ResourceLoader   = new ResourceLoader();
            m_ExtensionManager = new ExtensionManager();

            m_AssetStoreCache           = new AssetStoreCache();
            m_AssetStoreClient          = new AssetStoreClient();
            m_AssetStoreOAuth           = new AssetStoreOAuth();
            m_AssetStoreUtils           = new AssetStoreUtils();
            m_AssetStoreRestAPI         = new AssetStoreRestAPI();
            m_AssetStoreDownloadManager = new AssetStoreDownloadManager();
            m_AssetStoreCallQueue       = new AssetStoreCallQueue();
            m_AssetStoreCachePathProxy  = new AssetStoreCachePathProxy();

            m_UpmCache           = new UpmCache();
            m_UpmClient          = new UpmClient();
            m_UpmRegistryClient  = new UpmRegistryClient();
            m_UpmCacheRootClient = new UpmCacheRootClient();

            m_PackageFiltering    = new PackageFiltering();
            m_PackageManagerPrefs = new PackageManagerPrefs();

            m_PackageDatabase = new PackageDatabase();
            m_PageManager     = new PageManager();

            // Since dictionaries doesn't survive through serialization, we always re-create the default registration
            m_RegisteredObjects = new Dictionary <Type, object>();
            RegisterDefaultServices();

            m_DependenciesResolved = false;
            m_InitializeState      = State.NotInitialized;
        }