2016-04-21 30 views
1

當我添加以下重寫到AppDelegate中:的AppDelegate NIDAction

public override void HandleAction(UIApplication application, string actionIdentifier, NSDictionary remoteNotificationInfo, [BlockProxy(typeof(NIDAction))] Action completionHandler) 
{ 
} 

我收到以下錯誤:

Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'NIDAction' could not be found (are you missing a using directive or an assembly reference?) Notifi.iOS C:\development\notifi\Notifi\Notifi\Notifi.iOS\AppDelegate.cs 119 Active

我試圖尋找有關NIDAction的信息,但我不能找到有用的東西 - 我可以刪除這個屬性?

+0

同樣的問題:

只是這樣做。具有NIDAction的BlockProxy會自動添加到完成處理程序,但編譯器不知道類型NIDAction。你從那以後發現了什麼? –

回答

0

當Xamarin already does it在每個本地調用的簽名中都沒有必要註釋類型。這裏

public override void HandleAction (UIApplication application, string actionIdentifier, NSDictionary remoteNotificationInfo, Action completionHandler) 
{ 
    .... 
} 
+0

iccthedral感謝您的迴應 - 該註釋是由Visual Studio的代碼完成自動添加的。我覺得可以安全地刪除,但我很好奇屬性的作用。 – markpirvine

+0

好的,我得到你。這很可能是Xamarin.iOS程序集的內部。 也許你可以找到更多關於它,如果你想瀏覽該程序集。 – nullpotent