示例#1
0
        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_IOProxy            = new IOProxy();
            m_SettingsProxy      = new PackageManagerProjectSettingsProxy();

            m_ResourceLoader = new ResourceLoader();

            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_UpmCache  = new UpmCache();
            m_UpmClient = new UpmClient();

            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;
        }
示例#2
0
 protected void ResolveDependencies(PackageDatabase packageDatabase)
 {
     m_PackageDatabase = packageDatabase;
 }
示例#3
0
 public PaginatedPage(PackageDatabase packageDatabase, AssetStoreClient assetStoreClient, PackageFiltering packageFiltering, PackageManagerPrefs packageManagerPrefs, PackageFilterTab tab, PageCapability capability) : base(packageDatabase, tab, capability)
 {
     ResolveDependencies(packageDatabase, assetStoreClient, packageFiltering, packageManagerPrefs);
 }
示例#4
0
 public SimplePage(PackageDatabase packageDatabase, PackageFiltering packageFiltering, PackageFilterTab tab, PageCapability capability) : base(packageDatabase, tab, capability)
 {
     ResolveDependencies(packageDatabase, packageFiltering);
 }
示例#5
0
 public void ResolveDependencies(PackageDatabase packageDatabase, PackageFiltering packageFiltering)
 {
     ResolveDependencies(packageDatabase);
     m_PackageFiltering = packageFiltering;
 }