mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
516 B
20 lines
516 B
using CppSharp.AST.Extensions; |
|
|
|
namespace CppSharp.AST |
|
{ |
|
public static class PropertyExtensions |
|
{ |
|
public static bool IsInRefTypeAndBackedByValueClassField(this Property p) |
|
{ |
|
if (p.Field == null || ((Class) p.Namespace).IsRefType) |
|
return false; |
|
|
|
Type type; |
|
p.Field.Type.IsPointerTo(out type); |
|
type = type ?? p.Field.Type; |
|
|
|
Class decl; |
|
return type.IsTagDecl(out decl) && decl.IsValueType; |
|
} |
|
} |
|
} |