void ProcessPotentialName(ProcessedFieldInfo processedField) { if (RestrictedObjSelectors.IsImportantSelector(processedField.GetterName) || RestrictedObjSelectors.IsImportantSelector(processedField.SetterName)) { string newName = "managed" + processedField.Name.PascalCase(); Delayed.Add(ErrorHelper.CreateWarning(1051, $"Element {processedField.Name} is generated instead as {newName} because its name conflicts with an important objective-c selector.")); processedField.NameOverride = newName; } }
void ProcessPotentialName(ProcessedProperty processedProperty) { string getSignature = processedProperty.HasGetter ? processedProperty.GetMethod.ObjCSignature : ""; string setSignature = processedProperty.HasSetter ? processedProperty.SetMethod.ObjCSignature : ""; if (RestrictedObjSelectors.IsImportantSelector(getSignature) || RestrictedObjSelectors.IsImportantSelector(setSignature)) { string newName = "managed" + processedProperty.Name.PascalCase(); Delayed.Add(ErrorHelper.CreateWarning(1051, $"Element {processedProperty.Name} is generated instead as {newName} because its name conflicts with an important objective-c selector.")); processedProperty.NameOverride = newName; } }
void ProcessPotentialName(ProcessedMethod processedMethod) { MethodInfo method = processedMethod.Method; if (IsOperatorOrFriendlyVersion(method)) { string nameOverride = OperatorOverloads.GetObjCName(processedMethod.Method.Name, processedMethod.Method.GetParameters().Length); if (nameOverride != null) { processedMethod.NameOverride = nameOverride; } } string objCSignature = processedMethod.ObjCSignature; if (RestrictedObjSelectors.IsImportantSelector(objCSignature)) { string newName = "managed" + method.Name.PascalCase(); processedMethod.NameOverride = newName; Delayed.Add(ErrorHelper.CreateWarning(1051, $"Element {method.Name} is generated instead as {newName} because its name conflicts with an important objective-c selector.")); } }