|
|
|
@ -135,16 +135,17 @@ namespace CppSharp.Passes |
|
|
|
private static void GenerateProperty(DeclarationContext context, Method getter, Method setter = null) |
|
|
|
private static void GenerateProperty(DeclarationContext context, Method getter, Method setter = null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var type = (Class) context; |
|
|
|
var type = (Class) context; |
|
|
|
if (type.Properties.All(p => getter.Name != p.Name || |
|
|
|
var name = GetPropertyName(getter.Name); |
|
|
|
p.ExplicitInterfaceImpl != getter.ExplicitInterfaceImpl)) |
|
|
|
if (type.Properties.Any(p => p.Name == name && |
|
|
|
{ |
|
|
|
p.ExplicitInterfaceImpl == getter.ExplicitInterfaceImpl)) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
var property = new Property |
|
|
|
var property = new Property |
|
|
|
{ |
|
|
|
{ |
|
|
|
Access = getter.Access == AccessSpecifier.Public || |
|
|
|
Access = getter.Access == AccessSpecifier.Public || |
|
|
|
(setter != null && setter.Access == AccessSpecifier.Public) |
|
|
|
(setter != null && setter.Access == AccessSpecifier.Public) ? |
|
|
|
? AccessSpecifier.Public |
|
|
|
AccessSpecifier.Public : AccessSpecifier.Protected, |
|
|
|
: AccessSpecifier.Protected, |
|
|
|
Name = name, |
|
|
|
Name = GetPropertyName(getter.Name), |
|
|
|
|
|
|
|
Namespace = type, |
|
|
|
Namespace = type, |
|
|
|
QualifiedType = getter.OriginalReturnType, |
|
|
|
QualifiedType = getter.OriginalReturnType, |
|
|
|
OriginalNamespace = getter.OriginalNamespace |
|
|
|
OriginalNamespace = getter.OriginalNamespace |
|
|
|
@ -175,7 +176,6 @@ namespace CppSharp.Passes |
|
|
|
if (setter != null) |
|
|
|
if (setter != null) |
|
|
|
setter.GenerationKind = GenerationKind.Internal; |
|
|
|
setter.GenerationKind = GenerationKind.Internal; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static RawComment CombineComments(Declaration getter, Declaration setter) |
|
|
|
private static RawComment CombineComments(Declaration getter, Declaration setter) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|