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

            m_Application     = container.Resolve <ApplicationProxy>();
            m_AssetStoreCache = container.Resolve <AssetStoreCache>();
        }
Esempio n. 2
0
        public PackageDowngradeButton(AssetStoreDownloadManager assetStoreDownloadManager, AssetStoreCache assetStoreCache, PackageDatabase packageDatabase)
        {
            m_AssetStoreDownloadManager = assetStoreDownloadManager;
            m_AssetStoreCache           = assetStoreCache;
            m_PackageDatabase           = packageDatabase;

            m_Element.SetIcon("warning");
        }
Esempio n. 3
0
 public void ResolveDependencies(UnityConnectProxy unityConnect,
                                 AssetStoreOAuth assetStoreOAuth,
                                 AssetStoreCache assetStoreCache,
                                 HttpClientFactory httpClientFactory)
 {
     m_UnityConnect      = unityConnect;
     m_AssetStoreOAuth   = assetStoreOAuth;
     m_AssetStoreCache   = assetStoreCache;
     m_HttpClientFactory = httpClientFactory;
 }
Esempio n. 4
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_PackageDatabase     = container.Resolve <PackageDatabase>();
            m_PageManager         = container.Resolve <PageManager>();
            m_AssetStoreCache     = container.Resolve <AssetStoreCache>();
            m_AssetStoreCallQueue = container.Resolve <AssetStoreCallQueue>();
            m_SettingsProxy       = container.Resolve <PackageManagerProjectSettingsProxy>();
        }
Esempio n. 5
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_Application = container.Resolve <ApplicationProxy>();
            m_AssetStoreDownloadManager = container.Resolve <AssetStoreDownloadManager>();
            m_AssetStoreCache           = container.Resolve <AssetStoreCache>();
            m_PackageManagerPrefs       = container.Resolve <PackageManagerPrefs>();
            m_PackageDatabase           = container.Resolve <PackageDatabase>();
            m_PageManager       = container.Resolve <PageManager>();
            m_UnityConnectProxy = container.Resolve <UnityConnectProxy>();
        }
 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;
 }
Esempio n. 7
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>();
        }
Esempio n. 8
0
        public void ResolveDependencies(UnityConnectProxy unityConnect,
                                        AssetStoreCache assetStoreCache,
                                        AssetStoreUtils assetStoreUtils,
                                        AssetStoreRestAPI assetStoreRestAPI,
                                        UpmClient upmClient,
                                        IOProxy ioProxy)
        {
            m_UnityConnect      = unityConnect;
            m_AssetStoreCache   = assetStoreCache;
            m_AssetStoreUtils   = assetStoreUtils;
            m_AssetStoreRestAPI = assetStoreRestAPI;
            m_UpmClient         = upmClient;
            m_IOProxy           = ioProxy;

            m_ListOperation?.ResolveDependencies(unityConnect, assetStoreRestAPI, assetStoreCache);
        }
Esempio n. 9
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_ResourceLoader      = container.Resolve <ResourceLoader>();
            m_SettingsProxy       = container.Resolve <PackageManagerProjectSettingsProxy>();
            m_PackageDatabase     = container.Resolve <PackageDatabase>();
            m_PackageManagerPrefs = container.Resolve <PackageManagerPrefs>();
            m_Selection           = container.Resolve <SelectionProxy>();
            m_AssetDatabase       = container.Resolve <AssetDatabaseProxy>();
            m_Application         = container.Resolve <ApplicationProxy>();
            m_IOProxy             = container.Resolve <IOProxy>();
            m_AssetStoreCache     = container.Resolve <AssetStoreCache>();
            m_PageManager         = container.Resolve <PageManager>();
            m_UpmCache            = container.Resolve <UpmCache>();
        }
        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;
        }
Esempio n. 11
0
        public void ResolveDependencies(ApplicationProxy application,
                                        HttpClientFactory httpClientFactory,
                                        UnityConnectProxy unityConnect,
                                        IOProxy ioProxy,
                                        AssetStoreCache assetStoreCache,
                                        AssetStoreUtils assetStoreUtils,
                                        AssetStoreRestAPI assetStoreRestAPI,
                                        AssetStoreCachePathProxy assetStoreCachePathProxy)
        {
            m_Application              = application;
            m_UnityConnect             = unityConnect;
            m_IOProxy                  = ioProxy;
            m_HttpClientFactory        = httpClientFactory;
            m_AssetStoreCache          = assetStoreCache;
            m_AssetStoreUtils          = assetStoreUtils;
            m_AssetStoreRestAPI        = assetStoreRestAPI;
            m_AssetStoreCachePathProxy = assetStoreCachePathProxy;

            foreach (var operation in m_DownloadOperations.Values)
            {
                operation.ResolveDependencies(assetStoreUtils, assetStoreRestAPI, m_AssetStoreCachePathProxy);
            }
        }
        public PackageDetailsImagesTab(AssetStoreCache assetStoreCache)
        {
            m_Id              = k_Id;
            m_DisplayName     = L10n.Tr("Images");
            m_AssetStoreCache = assetStoreCache;

            m_ImageTextures = new List <Texture2D>();

            m_MainImage = new Image()
            {
                name = "mainImage", classList = { "image" }
            };
            m_MainImage.scaleMode = ScaleMode.ScaleToFit;

            // Wrap main image in two layers of containers to lock the aspect ratio
            var mainImageOuterContainer = new VisualElement()
            {
                name = "mainImageOuterContainer"
            };

            m_MainImageInnerContainer = new VisualElement()
            {
                name = "mainImageInnerContainer"
            };
            m_MainImageInnerContainer.Add(m_MainImage);
            mainImageOuterContainer.Add(m_MainImageInnerContainer);
            Add(mainImageOuterContainer);

            m_ThumbnailsContainer = new VisualElement()
            {
                name = "thumbnailsContainer"
            };
            Add(m_ThumbnailsContainer);

            m_Version = null;
        }
 public AssetStoreListOperation(UnityConnectProxy unityConnect, AssetStoreRestAPI assetStoreRestAPI, AssetStoreCache assetStoreCache)
 {
     ResolveDependencies(unityConnect, assetStoreRestAPI, assetStoreCache);
 }
 public void ResolveDependencies(UnityConnectProxy unityConnect, AssetStoreRestAPI assetStoreRestAPI, AssetStoreCache assetStoreCache)
 {
     m_UnityConnect      = unityConnect;
     m_AssetStoreRestAPI = assetStoreRestAPI;
     m_AssetStoreCache   = assetStoreCache;
 }
Esempio n. 15
0
 public PackageDownloadButton(AssetStoreDownloadManager assetStoreDownloadManager, AssetStoreCache assetStoreCache, PackageDatabase packageDatabase)
 {
     m_AssetStoreDownloadManager = assetStoreDownloadManager;
     m_AssetStoreCache           = assetStoreCache;
     m_PackageDatabase           = packageDatabase;
 }