From 7efa0db51f6936ad991f09dabe62759bcdd82cb9 Mon Sep 17 00:00:00 2001 From: Joni Savolainen Date: Thu, 5 May 2022 17:10:54 +0300 Subject: [PATCH] feat: move to UIComponents namespace from UIComponents.Core BREAKING CHANGE: All core code is now located in the UIComponents namespace, as opposed to UIComponents.Core. --- Assets/Examples/Addressables/AddressablesExampleComponent.cs | 2 +- Assets/Examples/Counter/CounterComponent.cs | 2 +- .../LoadFromAssetDatabase/AssetDatabaseExampleComponent.cs | 2 +- Assets/Examples/LoadFromResources/ResourcesExampleComponent.cs | 2 +- .../Addressables/AddressableAssetResolverTests.cs | 2 +- Assets/UIComponents.Tests/AssetPathAttributeTests.cs | 1 - Assets/UIComponents.Tests/AssetResolverTestSuite.cs | 1 - Assets/UIComponents.Tests/DependencyInjectorStaticTests.cs | 2 -- Assets/UIComponents.Tests/DependencyInjectorTests.cs | 2 -- Assets/UIComponents.Tests/LayoutAttributeTests.cs | 1 - Assets/UIComponents.Tests/PathAttributeTests.cs | 1 - Assets/UIComponents.Tests/ResourcesAssetResolverTests.cs | 1 - Assets/UIComponents.Tests/StylesheetAttributeTests.cs | 1 - Assets/UIComponents.Tests/UIComponentDependencyTests.cs | 1 - Assets/UIComponents.Tests/UIComponentNoAttributesTests.cs | 1 - Assets/UIComponents/Addressables/AddressableAssetResolver.cs | 1 - Assets/UIComponents/Core/AssetPathAttribute.cs | 2 +- Assets/UIComponents/Core/DependencyAttribute.cs | 2 +- Assets/UIComponents/Core/DependencyInjector.cs | 3 +-- .../UIComponents/Core/Exceptions/MissingProviderException.cs | 2 +- Assets/UIComponents/Core/IAssetResolver.cs | 2 +- Assets/UIComponents/Core/LayoutAttribute.cs | 2 +- Assets/UIComponents/Core/PathAttribute.cs | 2 +- Assets/UIComponents/Core/ResourcesAssetResolver.cs | 2 +- Assets/UIComponents/Core/StylesheetAttribute.cs | 2 +- Assets/UIComponents/Core/UIComponent.cs | 3 +-- Assets/UIComponents/Editor/AssetDatabaseAssetResolver.cs | 3 +-- 27 files changed, 16 insertions(+), 32 deletions(-) diff --git a/Assets/Examples/Addressables/AddressablesExampleComponent.cs b/Assets/Examples/Addressables/AddressablesExampleComponent.cs index a14bc39f..cf3fb153 100644 --- a/Assets/Examples/Addressables/AddressablesExampleComponent.cs +++ b/Assets/Examples/Addressables/AddressablesExampleComponent.cs @@ -1,4 +1,4 @@ -using UIComponents.Core; +using UIComponents; using UIComponents.Addressables; namespace UIComponentsExamples.Addressables diff --git a/Assets/Examples/Counter/CounterComponent.cs b/Assets/Examples/Counter/CounterComponent.cs index b5face7e..97f6217f 100644 --- a/Assets/Examples/Counter/CounterComponent.cs +++ b/Assets/Examples/Counter/CounterComponent.cs @@ -1,4 +1,4 @@ -using UIComponents.Core; +using UIComponents; using UnityEngine.UIElements; namespace UIComponentsExamples diff --git a/Assets/Examples/Editor/LoadFromAssetDatabase/AssetDatabaseExampleComponent.cs b/Assets/Examples/Editor/LoadFromAssetDatabase/AssetDatabaseExampleComponent.cs index 27cf030f..06f43889 100644 --- a/Assets/Examples/Editor/LoadFromAssetDatabase/AssetDatabaseExampleComponent.cs +++ b/Assets/Examples/Editor/LoadFromAssetDatabase/AssetDatabaseExampleComponent.cs @@ -1,4 +1,4 @@ -using UIComponents.Core; +using UIComponents; using UIComponents.Editor; namespace UIComponentsExamples.Editor diff --git a/Assets/Examples/LoadFromResources/ResourcesExampleComponent.cs b/Assets/Examples/LoadFromResources/ResourcesExampleComponent.cs index 7a649427..98cf1195 100644 --- a/Assets/Examples/LoadFromResources/ResourcesExampleComponent.cs +++ b/Assets/Examples/LoadFromResources/ResourcesExampleComponent.cs @@ -1,4 +1,4 @@ -using UIComponents.Core; +using UIComponents; namespace UIComponentsExamples { diff --git a/Assets/UIComponents.Tests/Addressables/AddressableAssetResolverTests.cs b/Assets/UIComponents.Tests/Addressables/AddressableAssetResolverTests.cs index 77ea8640..df4c518f 100644 --- a/Assets/UIComponents.Tests/Addressables/AddressableAssetResolverTests.cs +++ b/Assets/UIComponents.Tests/Addressables/AddressableAssetResolverTests.cs @@ -2,7 +2,7 @@ using UIComponents.Addressables; using UnityEngine.UIElements; -namespace UIComponents.Tests.Editor +namespace UIComponents.Tests.Addressables { [TestFixture] public class AddressableAssetResolverTests : AssetResolverTestSuite diff --git a/Assets/UIComponents.Tests/AssetPathAttributeTests.cs b/Assets/UIComponents.Tests/AssetPathAttributeTests.cs index fd22b4fc..72c0ddf2 100644 --- a/Assets/UIComponents.Tests/AssetPathAttributeTests.cs +++ b/Assets/UIComponents.Tests/AssetPathAttributeTests.cs @@ -1,7 +1,6 @@ using System.Linq; using NSubstitute; using NUnit.Framework; -using UIComponents.Core; namespace UIComponents.Tests { diff --git a/Assets/UIComponents.Tests/AssetResolverTestSuite.cs b/Assets/UIComponents.Tests/AssetResolverTestSuite.cs index b3353205..b5e411c1 100644 --- a/Assets/UIComponents.Tests/AssetResolverTestSuite.cs +++ b/Assets/UIComponents.Tests/AssetResolverTestSuite.cs @@ -1,5 +1,4 @@ using NUnit.Framework; -using UIComponents.Core; namespace UIComponents.Tests { diff --git a/Assets/UIComponents.Tests/DependencyInjectorStaticTests.cs b/Assets/UIComponents.Tests/DependencyInjectorStaticTests.cs index 29c9cbd6..0caf2f13 100644 --- a/Assets/UIComponents.Tests/DependencyInjectorStaticTests.cs +++ b/Assets/UIComponents.Tests/DependencyInjectorStaticTests.cs @@ -1,6 +1,4 @@ using NUnit.Framework; -using UIComponents.Core; -using UIComponents.Core.Exceptions; namespace UIComponents.Tests { diff --git a/Assets/UIComponents.Tests/DependencyInjectorTests.cs b/Assets/UIComponents.Tests/DependencyInjectorTests.cs index 00c8a928..552a11b8 100644 --- a/Assets/UIComponents.Tests/DependencyInjectorTests.cs +++ b/Assets/UIComponents.Tests/DependencyInjectorTests.cs @@ -1,7 +1,5 @@ using System; using NUnit.Framework; -using UIComponents.Core; -using UIComponents.Core.Exceptions; namespace UIComponents.Tests { diff --git a/Assets/UIComponents.Tests/LayoutAttributeTests.cs b/Assets/UIComponents.Tests/LayoutAttributeTests.cs index 97a7d5d0..4242f220 100644 --- a/Assets/UIComponents.Tests/LayoutAttributeTests.cs +++ b/Assets/UIComponents.Tests/LayoutAttributeTests.cs @@ -1,6 +1,5 @@ using NSubstitute; using NUnit.Framework; -using UIComponents.Core; using UnityEngine; using UnityEngine.UIElements; diff --git a/Assets/UIComponents.Tests/PathAttributeTests.cs b/Assets/UIComponents.Tests/PathAttributeTests.cs index de680f8a..316cf476 100644 --- a/Assets/UIComponents.Tests/PathAttributeTests.cs +++ b/Assets/UIComponents.Tests/PathAttributeTests.cs @@ -1,6 +1,5 @@ using NSubstitute; using NUnit.Framework; -using UIComponents.Core; namespace UIComponents.Tests { diff --git a/Assets/UIComponents.Tests/ResourcesAssetResolverTests.cs b/Assets/UIComponents.Tests/ResourcesAssetResolverTests.cs index 75b284aa..c964fb83 100644 --- a/Assets/UIComponents.Tests/ResourcesAssetResolverTests.cs +++ b/Assets/UIComponents.Tests/ResourcesAssetResolverTests.cs @@ -1,5 +1,4 @@ using NUnit.Framework; -using UIComponents.Core; using UnityEngine.UIElements; namespace UIComponents.Tests diff --git a/Assets/UIComponents.Tests/StylesheetAttributeTests.cs b/Assets/UIComponents.Tests/StylesheetAttributeTests.cs index 6ddf0d94..7bbd9702 100644 --- a/Assets/UIComponents.Tests/StylesheetAttributeTests.cs +++ b/Assets/UIComponents.Tests/StylesheetAttributeTests.cs @@ -2,7 +2,6 @@ using NSubstitute; using NSubstitute.ReturnsExtensions; using NUnit.Framework; -using UIComponents.Core; using UnityEngine; using UnityEngine.TestTools; using UnityEngine.UIElements; diff --git a/Assets/UIComponents.Tests/UIComponentDependencyTests.cs b/Assets/UIComponents.Tests/UIComponentDependencyTests.cs index 55c952e2..b4a84795 100644 --- a/Assets/UIComponents.Tests/UIComponentDependencyTests.cs +++ b/Assets/UIComponents.Tests/UIComponentDependencyTests.cs @@ -1,5 +1,4 @@ using NUnit.Framework; -using UIComponents.Core; namespace UIComponents.Tests { diff --git a/Assets/UIComponents.Tests/UIComponentNoAttributesTests.cs b/Assets/UIComponents.Tests/UIComponentNoAttributesTests.cs index b950daaf..63655288 100644 --- a/Assets/UIComponents.Tests/UIComponentNoAttributesTests.cs +++ b/Assets/UIComponents.Tests/UIComponentNoAttributesTests.cs @@ -1,7 +1,6 @@ using System.Linq; using NSubstitute; using NUnit.Framework; -using UIComponents.Core; using UnityEngine.UIElements; namespace UIComponents.Tests diff --git a/Assets/UIComponents/Addressables/AddressableAssetResolver.cs b/Assets/UIComponents/Addressables/AddressableAssetResolver.cs index 952918fc..dbdb52d6 100644 --- a/Assets/UIComponents/Addressables/AddressableAssetResolver.cs +++ b/Assets/UIComponents/Addressables/AddressableAssetResolver.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using UIComponents.Core; using UnityEngine.ResourceManagement.AsyncOperations; namespace UIComponents.Addressables diff --git a/Assets/UIComponents/Core/AssetPathAttribute.cs b/Assets/UIComponents/Core/AssetPathAttribute.cs index 48b17af4..be55a633 100644 --- a/Assets/UIComponents/Core/AssetPathAttribute.cs +++ b/Assets/UIComponents/Core/AssetPathAttribute.cs @@ -1,7 +1,7 @@ using System; using JetBrains.Annotations; -namespace UIComponents.Core +namespace UIComponents { /// /// If present, specifies a base path of assets configured for a UIComponent. diff --git a/Assets/UIComponents/Core/DependencyAttribute.cs b/Assets/UIComponents/Core/DependencyAttribute.cs index c94141b5..30de4e4b 100644 --- a/Assets/UIComponents/Core/DependencyAttribute.cs +++ b/Assets/UIComponents/Core/DependencyAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace UIComponents.Core +namespace UIComponents { /// /// Used to define a dependency for a UIComponent. diff --git a/Assets/UIComponents/Core/DependencyInjector.cs b/Assets/UIComponents/Core/DependencyInjector.cs index fa97c382..8f6a1bff 100644 --- a/Assets/UIComponents/Core/DependencyInjector.cs +++ b/Assets/UIComponents/Core/DependencyInjector.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using JetBrains.Annotations; -using UIComponents.Core.Exceptions; -namespace UIComponents.Core +namespace UIComponents { /// /// The class responsible for providing UIComponents with their diff --git a/Assets/UIComponents/Core/Exceptions/MissingProviderException.cs b/Assets/UIComponents/Core/Exceptions/MissingProviderException.cs index 50eb3750..dadc7731 100644 --- a/Assets/UIComponents/Core/Exceptions/MissingProviderException.cs +++ b/Assets/UIComponents/Core/Exceptions/MissingProviderException.cs @@ -1,6 +1,6 @@ using System; -namespace UIComponents.Core.Exceptions +namespace UIComponents { /// /// Thrown when a dependency does not have a provider. diff --git a/Assets/UIComponents/Core/IAssetResolver.cs b/Assets/UIComponents/Core/IAssetResolver.cs index 4e6693b5..7f4d833a 100644 --- a/Assets/UIComponents/Core/IAssetResolver.cs +++ b/Assets/UIComponents/Core/IAssetResolver.cs @@ -1,4 +1,4 @@ -namespace UIComponents.Core +namespace UIComponents { /// /// An interface for classes whose purpose is to load assets diff --git a/Assets/UIComponents/Core/LayoutAttribute.cs b/Assets/UIComponents/Core/LayoutAttribute.cs index c7a943f6..721e9a95 100644 --- a/Assets/UIComponents/Core/LayoutAttribute.cs +++ b/Assets/UIComponents/Core/LayoutAttribute.cs @@ -1,7 +1,7 @@ using System; using JetBrains.Annotations; -namespace UIComponents.Core +namespace UIComponents { /// /// Specifies the path to the .uxml layout file used by a UIComponent. diff --git a/Assets/UIComponents/Core/PathAttribute.cs b/Assets/UIComponents/Core/PathAttribute.cs index c61a0339..1f6903a4 100644 --- a/Assets/UIComponents/Core/PathAttribute.cs +++ b/Assets/UIComponents/Core/PathAttribute.cs @@ -2,7 +2,7 @@ using UnityEditor; using UnityEngine; -namespace UIComponents.Core +namespace UIComponents { /// /// A base class for attributes which store a path to an asset. diff --git a/Assets/UIComponents/Core/ResourcesAssetResolver.cs b/Assets/UIComponents/Core/ResourcesAssetResolver.cs index 64d300de..df5d2521 100644 --- a/Assets/UIComponents/Core/ResourcesAssetResolver.cs +++ b/Assets/UIComponents/Core/ResourcesAssetResolver.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace UIComponents.Core +namespace UIComponents { /// /// An IAssetResolver which loads assets from Resources. Used diff --git a/Assets/UIComponents/Core/StylesheetAttribute.cs b/Assets/UIComponents/Core/StylesheetAttribute.cs index 87841d07..3377ca22 100644 --- a/Assets/UIComponents/Core/StylesheetAttribute.cs +++ b/Assets/UIComponents/Core/StylesheetAttribute.cs @@ -1,7 +1,7 @@ using System; using JetBrains.Annotations; -namespace UIComponents.Core +namespace UIComponents { /// /// Specifies the path to a .uss stylesheet file used by a UIComponent. diff --git a/Assets/UIComponents/Core/UIComponent.cs b/Assets/UIComponents/Core/UIComponent.cs index 86810102..12f9b74f 100644 --- a/Assets/UIComponents/Core/UIComponent.cs +++ b/Assets/UIComponents/Core/UIComponent.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; -using UIComponents.Core.Exceptions; using JetBrains.Annotations; using UnityEngine; using UnityEngine.UIElements; -namespace UIComponents.Core +namespace UIComponents { /// /// A VisualElement which is configurable with various attributes like diff --git a/Assets/UIComponents/Editor/AssetDatabaseAssetResolver.cs b/Assets/UIComponents/Editor/AssetDatabaseAssetResolver.cs index 0f3cf545..ac62c31b 100644 --- a/Assets/UIComponents/Editor/AssetDatabaseAssetResolver.cs +++ b/Assets/UIComponents/Editor/AssetDatabaseAssetResolver.cs @@ -1,5 +1,4 @@ -using UIComponents.Core; -using UnityEditor; +using UnityEditor; namespace UIComponents.Editor {