From 0416a35e8d972e124722ac8766a2a88a57595574 Mon Sep 17 00:00:00 2001 From: marcos henrich Date: Wed, 16 Apr 2014 16:12:39 +0100 Subject: [PATCH] Added CheckIgnoreProperty to AST/Utils.cs. Changed CheckIgnoreField to handle value class fields declared in linked assemblies. --- src/Generator/AST/Utils.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Generator/AST/Utils.cs b/src/Generator/AST/Utils.cs index 1e887257..f7e2a90b 100644 --- a/src/Generator/AST/Utils.cs +++ b/src/Generator/AST/Utils.cs @@ -65,7 +65,21 @@ namespace CppSharp.AST if (field.Access == AccessSpecifier.Private) return true; - return !field.IsGenerated; + if (field.Class.IsValueType && field.IsDeclared) + return false; + + return !field.IsGenerated; + } + + public static bool CheckIgnoreProperty(Property prop) + { + if (prop.Access == AccessSpecifier.Private) + return true; + + if (prop.Field != null && prop.Field.Class.IsValueType && prop.IsDeclared) + return false; + + return !prop.IsGenerated; } }