diff --git a/api/Avalonia.nupkg.xml b/api/Avalonia.nupkg.xml
index 2230532c05..9b8e28783f 100644
--- a/api/Avalonia.nupkg.xml
+++ b/api/Avalonia.nupkg.xml
@@ -1003,6 +1003,72 @@
baseline/designer/Avalonia.Designer.HostApp.dll
target/designer/Avalonia.Designer.HostApp.dll
+
+ CP0001
+ T:Avalonia.AvaloniaLocator.RegistrationHelper`1
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.AvaloniaLocator.ResolverDisposable
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Input.FocusManager.<GetFocusScopeAncestors>d__18
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Layout.LayoutManager.<>c
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Layout.LayoutManager.ArrangeResult
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Layout.LayoutManager.EffectiveViewportChangedListener
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Rendering.DefaultRenderTimer.<>c__DisplayClass13_0
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Rendering.UiThreadRenderTimer.<>c__DisplayClass3_0
+ baseline/netstandard2.0/Avalonia.Base.dll
+ target/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Controls.Primitives.PopupPositioning.ManagedPopupPositioner.<>c__DisplayClass5_0
+ baseline/netstandard2.0/Avalonia.Controls.dll
+ target/netstandard2.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.Primitives.PopupPositioning.ManagedPopupPositionerPopupImplHelper.<>c
+ baseline/netstandard2.0/Avalonia.Controls.dll
+ target/netstandard2.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.Primitives.PopupPositioning.ManagedPopupPositionerPopupImplHelper.MoveResizeDelegate
+ baseline/netstandard2.0/Avalonia.Controls.dll
+ target/netstandard2.0/Avalonia.Controls.dll
+
CP0006
P:Avalonia.Rendering.Composition.ICompositionGpuImportedObject.ImportCompleted
diff --git a/nukebuild/RefAssemblyGenerator.cs b/nukebuild/RefAssemblyGenerator.cs
index e93070e2f0..f103f16919 100644
--- a/nukebuild/RefAssemblyGenerator.cs
+++ b/nukebuild/RefAssemblyGenerator.cs
@@ -70,9 +70,6 @@ public class RefAssemblyGenerator
static void ProcessType(TypeDefinition type, MethodReference obsoleteCtor)
{
- foreach (var nested in type.NestedTypes)
- ProcessType(nested, obsoleteCtor);
-
var hideMembers = (type.IsInterface && type.Name.EndsWith("Impl"))
|| HasPrivateApi(type.CustomAttributes);
@@ -97,7 +94,7 @@ public class RefAssemblyGenerator
foreach (var m in type.Methods)
{
- if (hideMembers || HasPrivateApi(m.CustomAttributes))
+ if (!m.IsPrivate && (hideMembers || HasPrivateApi(m.CustomAttributes)))
{
HideMethod(m);
}
@@ -108,30 +105,27 @@ public class RefAssemblyGenerator
{
if (HasPrivateApi(p.CustomAttributes))
{
- if (p.SetMethod != null)
- HideMethod(p.SetMethod);
- if (p.GetMethod != null)
- HideMethod(p.GetMethod);
+ if (p.SetMethod is { IsPrivate: false } setMethod)
+ HideMethod(setMethod);
+ if (p.GetMethod is { IsPrivate: false } getMethod)
+ HideMethod(getMethod);
}
}
foreach (var f in type.Fields)
{
- if (hideMembers || HasPrivateApi(f.CustomAttributes))
+ if (!f.IsPrivate && (hideMembers || HasPrivateApi(f.CustomAttributes)))
{
- var dflags = FieldAttributes.Public | FieldAttributes.Family | FieldAttributes.FamORAssem |
- FieldAttributes.FamANDAssem | FieldAttributes.Assembly;
- f.Attributes = ((f.Attributes | dflags) ^ dflags) | FieldAttributes.Assembly;
+ f.IsAssembly = true;
}
}
foreach (var cl in type.NestedTypes)
{
ProcessType(cl, obsoleteCtor);
- if (hideMembers)
+ if (hideMembers && cl.IsNestedPublic)
{
- var dflags = TypeAttributes.Public;
- cl.Attributes = ((cl.Attributes | dflags) ^ dflags) | TypeAttributes.NotPublic;
+ cl.IsNestedAssembly = true;
}
}
@@ -143,9 +137,7 @@ public class RefAssemblyGenerator
static void HideMethod(MethodDefinition m)
{
- var dflags = MethodAttributes.Public | MethodAttributes.Family | MethodAttributes.FamORAssem |
- MethodAttributes.FamANDAssem | MethodAttributes.Assembly;
- m.Attributes = ((m.Attributes | dflags) ^ dflags) | MethodAttributes.Assembly;
+ m.IsAssembly = true;
}
static void MarkAsUnstable(IMemberDefinition def, MethodReference obsoleteCtor, ICustomAttribute? unstableAttribute)