コード例 #1
0
        public NSDictionary ConvertToNSDictionary(Dictionary <String, Object> dictionary)
        {
            NSMutableDictionary prunedDictionary = new NSMutableDictionary();

            foreach (String key in dictionary.Keys)
            {
                Object dicValue = dictionary[key];

                if (dicValue is Dictionary <String, Object> )
                {
                    prunedDictionary.Add(new NSString(key), ConvertToNSDictionary((dicValue as Dictionary <String, Object>)));
                }
                else
                {
                    //SystemLogger.Log(SystemLogger.Module.PLATFORM, "***** key["+key+"] is instance of: " + dicValue.GetType().FullName);
                    if (dicValue != null)
                    {
                        if (dicValue is String)
                        {
                            prunedDictionary.Add(new NSString(key), new NSString((dicValue as String)));
                        }
                        else if (dicValue is int)
                        {
                            prunedDictionary.Add(new NSString(key), new NSNumber((int)dicValue));
                        }
                        else if (dicValue is Object[])
                        {
                            prunedDictionary.Add(new NSString(key), ConvertToNSArray((Object[])dicValue));
                        }
                        else if (dicValue is System.Collections.ArrayList)
                        {
                            prunedDictionary.Add(new NSString(key), ConvertToNSArray((dicValue as System.Collections.ArrayList).ToArray()));
                        }
                        else
                        {
                            SystemLogger.Log(SystemLogger.Module.PLATFORM, "*** exception parsing key[" + key + "] instance of: " + dicValue.GetType().FullName + ". No complex object are valid inside this dictionary");
                        }
                    }
                }
            }
            return(prunedDictionary);
        }
コード例 #2
0
 public void WebViewLoadingFinished(UIApplicationState applicationState, NSDictionary options)
 {
     SystemLogger.Log(SystemLogger.Module.PLATFORM, "******************************************* Detected WebView Loading Finished (processing launch options, if any)");
     UIApplicationWeakDelegate.processNotification(options, true, applicationState);
 }
コード例 #3
0
 private static void log(string message)
 {
     SystemLogger.Log(SystemLogger.Module.GUI, "Push Notifications - UIApplicationWeakDelegate: " + message);
 }