[NUI][XamlBuild][API10] Fix namespace confused issue.
authorhuayong.xu <huayong.xu@samsung.com>
Tue, 31 Jan 2023 09:09:08 +0000 (17:09 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 2 Feb 2023 01:48:51 +0000 (10:48 +0900)
src/Tizen.NUI.XamlBuild/src/public/XamlBuild/NUIXamlCTask.cs
src/Tizen.NUI.XamlBuild/src/public/XamlBuild/XamlGenerator.cs

index 3f06f0e..391caa7 100755 (executable)
@@ -419,7 +419,7 @@ namespace Tizen.NUI.Xaml.Build.Tasks
             }
 
             CustomAttribute xamlFilePathAttr;
-            var xamlFilePath = typeDef.HasCustomAttributes && (xamlFilePathAttr = typeDef.CustomAttributes.FirstOrDefault(ca => ca.AttributeType.FullName == "Tizen.NUI.Xaml.XamlFilePathAttribute")) != null ?
+            var xamlFilePath = typeDef.HasCustomAttributes && (xamlFilePathAttr = typeDef.CustomAttributes.FirstOrDefault(ca => ca.AttributeType.FullName.Contains("Tizen.NUI.Xaml.XamlFilePathAttribute"))) != null ?
                                       (string)xamlFilePathAttr.ConstructorArguments[0].Value :
                                       resource.Name;
 
@@ -517,7 +517,7 @@ namespace Tizen.NUI.Xaml.Build.Tasks
             ModuleDefinition module = typeDef.Module;
 
             CustomAttribute xamlFilePathAttr;
-            var xamlFilePath = typeDef.HasCustomAttributes && (xamlFilePathAttr = typeDef.CustomAttributes.FirstOrDefault(ca => ca.AttributeType.FullName == "Tizen.NUI.Xaml.XamlFilePathAttribute")) != null ?
+            var xamlFilePath = typeDef.HasCustomAttributes && (xamlFilePathAttr = typeDef.CustomAttributes.FirstOrDefault(ca => ca.AttributeType.FullName.Contains("Tizen.NUI.Xaml.XamlFilePathAttribute"))) != null ?
                                       (string)xamlFilePathAttr.ConstructorArguments[0].Value :
                                       resource.Name;
 
index e5dfcab..b0c37d0 100755 (executable)
@@ -323,13 +323,13 @@ namespace Tizen.NUI.Xaml.Build.Tasks
                 IsPartial = true,
                 TypeAttributes = GetTypeAttributes(classModifier),
                 CustomAttributes = {
-                    new CodeAttributeDeclaration(new CodeTypeReference(NUIXamlCTask.xamlNameSpace + ".XamlFilePathAttribute"),
+                    new CodeAttributeDeclaration(new CodeTypeReference($"global::{NUIXamlCTask.xamlNameSpace}.XamlFilePathAttribute"),
                          new CodeAttributeArgument(new CodePrimitiveExpression(XamlFile))),
                 }
             };
             if (AddXamlCompilationAttribute)
                 declType.CustomAttributes.Add(
-                    new CodeAttributeDeclaration(new CodeTypeReference(NUIXamlCTask.xamlNameSpace + ".XamlCompilationAttribute"),
+                    new CodeAttributeDeclaration(new CodeTypeReference($"global::{NUIXamlCTask.xamlNameSpace}.XamlCompilationAttribute"),
                                                  new CodeAttributeArgument(new CodeSnippetExpression($"global::{typeof(XamlCompilationOptions).FullName}.Compile"))));
             if (HideFromIntellisense)
                 declType.CustomAttributes.Add(