本文整理汇总了C#中NSDictionary.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# NSDictionary.ToString方法的具体用法?C# NSDictionary.ToString怎么用?C# NSDictionary.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NSDictionary
的用法示例。
在下文中一共展示了NSDictionary.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReceivedRemoteNotification
public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
{
Console.WriteLine(userInfo.ToString());
NSObject inAppMessage;
bool success = userInfo.TryGetValue(new NSString("inAppMessage"), out inAppMessage);
if (success)
{
var alert = new UIAlertView("Got push notification", inAppMessage.ToString(), null, "OK", null);
alert.Show();
}
}
示例2: ReceivedRemoteNotification
public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
{
// NOTE: Don't call the base implementation on a Model class
// see http://docs.xamarin.com/guides/ios/application_fundamentals/delegates,_protocols,_and_events
Debug.WriteLine(userInfo.ToString());
NSObject inAppMessage;
bool success = userInfo.TryGetValue(new NSString("inAppMessage"), out inAppMessage);
if (success)
{
var alert = new UIAlertView("Got push notification", inAppMessage.ToString(), null, "OK", null);
alert.Show();
}
}
示例3: ReceivedRemoteNotification
public void ReceivedRemoteNotification(NSDictionary userInfo)
{
string message = null;
NSObject aps = userInfo.ObjectForKey(new NSString("aps"));
if (aps != null && aps.IsKindOfClass(new Class(typeof(NSDictionary))))
{
var dict = (NSDictionary)aps;
NSObject alert = dict.ObjectForKey(new NSString("alert"));
if (alert != null && alert.IsKindOfClass(new Class(typeof(NSString))))
message = alert.ToString();
}
if (message != null)
BusinessProcessContext.Current.GlobalEventsController.OnPushMessage(message);
else
_applicaitonContext.HandleException(new NonFatalException(D.PUSH_NOTIFICATION_ERROR, userInfo.ToString()));
}
示例4: ReceiveEvent
public override NSObject ReceiveEvent(CoronaView view, NSDictionary pEvent)
{
if(OnReceive!=null){
OnReceive (view,pEvent);
}
//Console.WriteLine ("CoronaViewDelegate.ReceiveEvent:{0}",pEvent);
return new NSString( pEvent.ToString());
}