Optimization: don't attempt registering dependency properties for .NET BCL types
aienabled opened this issue · 0 comments
aienabled commented
Hi guys,
as .NET BCL types by definition cannot contain NoesisGUI calls you can safely ignore them here:
Managed/Src/Noesis/Core/Src/Core/Extend.cs
Lines 1642 to 1648 in c2ccfc4
You can check it this way:
private static readonly Assembly BclAssembly = typeof(object).Assembly;
private static void RegisterDependencyProperties(System.Type type)
{
if (ReferenceEquals(type.Assembly, BclAssembly))
{
return;
}
if (typeof(DependencyObject).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()))
{
RunClassConstructor(type);
return;
}
...
Regards!