当我将以下覆盖添加到AppDelegate时:
public override void HandleAction(UIApplication application, string actionIdentifier, NSDictionary remoteNotificationInfo, [BlockProxy(typeof(NIDAction))] Action completionHandler)
{
}
我收到以下错误:
严重级代码说明项目文件行抑制状态错误 CS0246找不到类型或命名空间名称'NIDAction'(是 你错过了using指令或程序集引用?)Notifi.iOS C:\ development \ notifi \ Notifi \ Notifi \ Notifi.iOS \ AppDelegate.cs 119 活性
我已尝试搜索有关NIDAction的信息,但我找不到任何有用的信息 - 我可以删除此属性吗?
答案 0 :(得分:0)
当Xamarin already does it出现在每个原生呼叫的签名中时,您无需对类型进行注释。
这样做:
for line in input_lines:
m = re.match(r'''
^\( # at the beginning of the line look for a (
[A-Z]+ # then a group of upper-case letters, i.e. OUTPUT
\) # followed by a )
\s* # some space
\* # a literal *
\s* # more space
(?P<tag>[A-Z0-9]+) # create a named group (tag) that matches HDMI1, ie. upper case letters or numbers
\s* # more space
(?P<nums>[\d\.]+) # followed by a sequence of numbers and .
$ # before reaching the end of the line
''', line, re.VERBOSE)
if m:
break
else: # note: this else goes with the for-loop
raise ValueError("Couldn't find a match")
# we get here if we hit the break statement
tag = m.groupdict()['tag'] # HDMI1
nums = m.groupdict()['nums'] # 124.124.124