Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanhaoXu <v-jex@microsoft.com>2021-09-14 04:47:01 +0300
committerGitHub <noreply@github.com>2021-09-14 04:47:01 +0300
commit853953c12a6942d01164ce5c6526b5816e90bbd2 (patch)
tree9eb07703c1daadab3cd0ed5b2fc073e44352e9ed
parent3f9c168e198cc104b368a0629bd3981bd34d953c (diff)
Added support for Microsoft.UI.Xaml dependency property (#563)
* Added Microsoft Xaml Dependency Property support * Trigger CI * Update AttachedEntitiesHelper.cs Co-authored-by: anmeng10101 <33647870+anmeng10101@users.noreply.github.com>
-rw-r--r--mdoc/Consts.cs3
-rw-r--r--mdoc/Mono.Documentation/Util/AttachedEntitiesHelper.cs9
2 files changed, 8 insertions, 4 deletions
diff --git a/mdoc/Consts.cs b/mdoc/Consts.cs
index 2453363d..6b775d32 100644
--- a/mdoc/Consts.cs
+++ b/mdoc/Consts.cs
@@ -22,7 +22,8 @@ namespace Mono.Documentation
public const string JavascriptLowCase = "javascript";
public const string DependencyPropertyFullName = "System.Windows.DependencyProperty";
- public const string DependencyPropertyFullNameXaml = "Windows.UI.Xaml.DependencyProperty";
+ public const string DependencyPropertyFullNameWindowsXaml = "Windows.UI.Xaml.DependencyProperty";
+ public const string DependencyPropertyFullNameMicrosoftXaml = "Microsoft.UI.Xaml.DependencyProperty";
public const string DependencyObjectFullName = "System.Windows.DependencyObject";
public const string DependencyObjectFullNameXaml = "Windows.UI.Xaml.DependencyObject";
diff --git a/mdoc/Mono.Documentation/Util/AttachedEntitiesHelper.cs b/mdoc/Mono.Documentation/Util/AttachedEntitiesHelper.cs
index cb451fb1..02057c38 100644
--- a/mdoc/Mono.Documentation/Util/AttachedEntitiesHelper.cs
+++ b/mdoc/Mono.Documentation/Util/AttachedEntitiesHelper.cs
@@ -116,7 +116,8 @@ namespace Mono.Documentation.Util
}
foreach (var property in type.Properties.Where(t => t.PropertyType.FullName == Consts.DependencyPropertyFullName
- || t.PropertyType.FullName == Consts.DependencyPropertyFullNameXaml))
+ || t.PropertyType.FullName == Consts.DependencyPropertyFullNameWindowsXaml
+ || t.PropertyType.FullName == Consts.DependencyPropertyFullNameMicrosoftXaml))
{
if (IsAttachedProperty(property, methods))
yield return new AttachedPropertyReference(property);
@@ -138,7 +139,8 @@ namespace Mono.Documentation.Util
return !hasExistingProperty.IsTrue () && !hasExistingField.IsTrue () &&
// Class X has a static field of type DependencyProperty [Name]Property
- (field.FieldType.FullName == Consts.DependencyPropertyFullName || field.FieldType.FullName == Consts.DependencyPropertyFullNameXaml)
+ (field.FieldType.FullName == Consts.DependencyPropertyFullName || field.FieldType.FullName == Consts.DependencyPropertyFullNameWindowsXaml
+ || field.FieldType.FullName == Consts.DependencyPropertyFullNameMicrosoftXaml)
&& field.IsPublic
&& field.IsStatic
&& field.IsInitOnly
@@ -163,7 +165,8 @@ namespace Mono.Documentation.Util
return !hasExistingProperty.IsTrue() && !hasExistingField.IsTrue() &&
// Class X has a static field of type DependencyProperty [Name]Property
- (property.PropertyType.Name == Consts.DependencyPropertyFullName || property.PropertyType.FullName == Consts.DependencyPropertyFullNameXaml)
+ (property.PropertyType.FullName == Consts.DependencyPropertyFullName || property.PropertyType.FullName == Consts.DependencyPropertyFullNameWindowsXaml
+ || property.PropertyType.FullName == Consts.DependencyPropertyFullNameMicrosoftXaml)
// Class X also has static methods with the following names: Get[Name] and Set[Name]