diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2011-08-23 16:51:18 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2011-08-23 16:57:52 +0400 |
commit | 31f79cdcbfed6a6703b4294b38c984218b9939d8 (patch) | |
tree | d02ef77ca208360548dbd297c04820383ec6db60 /main | |
parent | 583d3f40e63926d21c213e921ea44767116e93e1 (diff) |
[MacDev] Handle the Register attribute taking two parameters.
The attribute was modified to take a string name and bool parameter for one ctor
overload. We need to handle this case aswell.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs index dc0d68f320..31c76a5dfb 100644 --- a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs +++ b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs @@ -149,7 +149,8 @@ namespace MonoDevelop.MacDev.ObjCIntegration MonoDevelop.DesignerSupport.CodeBehind.IsDesignerFile (part.CompilationUnit.FileName); } //type registered with an explicit type name are up to the user to provide a valid name - if (att.PositionalArguments.Count == 1) + // Note that the attribute now takes one *or* two parameters. + if (att.PositionalArguments.Count == 1 || att.PositionalArguments.Count == 2) objcName = (string)((System.CodeDom.CodePrimitiveExpression)att.PositionalArguments[0]).Value; //non-nested types in the root namespace have names accessible from obj-c else if (string.IsNullOrEmpty (type.Namespace) && type.Name.IndexOf ('.') < 0) |