• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NSMutableDictionary类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NSMutableDictionary的典型用法代码示例。如果您正苦于以下问题:C# NSMutableDictionary类的具体用法?C# NSMutableDictionary怎么用?C# NSMutableDictionary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NSMutableDictionary类属于命名空间,在下文中一共展示了NSMutableDictionary类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CMMemoryPool

		public CMMemoryPool (TimeSpan ageOutPeriod)
		{
			using (var dict = new NSMutableDictionary ()) {
				dict.LowlevelSetObject (AgeOutPeriodSelector, new NSNumber (ageOutPeriod.TotalSeconds).Handle);
				handle = CMMemoryPoolCreate (dict.Handle);
			}
		}
开发者ID:Anomalous-Software,项目名称:maccore,代码行数:7,代码来源:CMMemoryPool.cs


示例2: CreateKeyPair

        /// <inheritdoc/>
        public ICryptographicKey CreateKeyPair(int keySize)
        {
            Requires.Range(keySize > 0, "keySize");

            string keyIdentifier = Guid.NewGuid().ToString();
            string publicKeyIdentifier = RsaCryptographicKey.GetPublicKeyIdentifierWithTag(keyIdentifier);
            string privateKeyIdentifier = RsaCryptographicKey.GetPrivateKeyIdentifierWithTag(keyIdentifier);

            // Configure parameters for the joint keypair.
            var keyPairAttr = new NSMutableDictionary();
            keyPairAttr[KSec.AttrKeyType] = KSec.AttrKeyTypeRSA;
            keyPairAttr[KSec.AttrKeySizeInBits] = NSNumber.FromInt32(keySize);

            // Configure parameters for the private key
            var privateKeyAttr = new NSMutableDictionary();
            privateKeyAttr[KSec.AttrIsPermanent] = NSNumber.FromBoolean(true);
            privateKeyAttr[KSec.AttrApplicationTag] = NSData.FromString(privateKeyIdentifier, NSStringEncoding.UTF8);

            // Configure parameters for the public key
            var publicKeyAttr = new NSMutableDictionary();
            publicKeyAttr[KSec.AttrIsPermanent] = NSNumber.FromBoolean(true);
            publicKeyAttr[KSec.AttrApplicationTag] = NSData.FromString(publicKeyIdentifier, NSStringEncoding.UTF8);

            // Parent the individual key parameters to the keypair one.
            keyPairAttr[KSec.PublicKeyAttrs] = publicKeyAttr;
            keyPairAttr[KSec.PrivateKeyAttrs] = privateKeyAttr;

            // Generate the RSA key.
            SecKey publicKey, privateKey;
            SecStatusCode code = SecKey.GenerateKeyPair(keyPairAttr, out publicKey, out privateKey);
            Verify.Operation(code == SecStatusCode.Success, "status was " + code);

            return new RsaCryptographicKey(publicKey, privateKey, keyIdentifier, this.algorithm);
        }
开发者ID:tofutim,项目名称:PCLCrypto,代码行数:35,代码来源:RsaAsymmetricKeyAlgorithmProvider.cs


示例3: AddBeerToIndex

        public void AddBeerToIndex(Beer beer)
        {
            var activity = new NSUserActivity("com.micjames.beerdrinkin.beerdetails");

            if (!string.IsNullOrEmpty(beer.Description))
            {
                var info = new NSMutableDictionary();
                info.Add(new NSString("name"), new NSString(beer.Name));
                info.Add(new NSString("description"), new NSString(beer.Description));

                if (beer?.Image?.MediumUrl != null)
                {
                    info.Add(new NSString("imageUrl"), new NSString(beer.Image.LargeUrl));
                }

                var attributes = new CSSearchableItemAttributeSet();
                attributes.DisplayName = beer.Name;
                attributes.ContentDescription = beer.Description;

                var keywords = new NSString[] { new NSString(beer.Name), new NSString("beerName") };
                activity.Keywords = new NSSet<NSString>(keywords);
                activity.ContentAttributeSet = attributes;

                activity.Title = beer.Name;
                activity.UserInfo = info;

                activity.EligibleForSearch = true;
                activity.EligibleForPublicIndexing = true;
                activity.BecomeCurrent();
            }

        }
开发者ID:MikeCodesDotNet,项目名称:Beer-Drinkin,代码行数:32,代码来源:SpotlightService.cs


示例4: logEvent

 public void logEvent (string eventName, object[] args) {
   if (args.Length == 0) {
     try {
       FA.Flurry.LogEvent(eventName);
     } catch (Exception e) {
       PlayN.log().warn("Failed to log event to Flurry [event=" + eventName + "]", e);
     }
   } else {
     var dict = new NSMutableDictionary();
     for (int ii = 0; ii < args.Length; ii += 2) {
       var key = (string)args[ii];
       var value = args[ii+1];
       if (value is string) {
         dict.Add(new NSString(key), new NSString((string)value));
       } else if (value is java.lang.Boolean) {
         dict.Add(new NSString(key), new NSNumber(((java.lang.Boolean)value).booleanValue()));
       } else if (value is java.lang.Integer) {
         dict.Add(new NSString(key), new NSNumber(((java.lang.Integer)value).intValue()));
       } else {
         var vclass = (value == null) ? "null" : value.GetType().ToString();
         PlayN.log().warn("Got unknown Flurry event parameter type [key=" + key +
                          ", value=" + value + ", vclass=" + vclass + "]");
       }
     }
     try {
       FA.Flurry.LogEvent(eventName, dict);
     } catch (Exception e) {
       PlayN.log().warn("Failed to log event to Flurry [event=" + eventName +
                        ", argCount=" + args.Length + "]", e);
     }
   }
 }
开发者ID:livingblast,项目名称:playn-samples,代码行数:32,代码来源:Main.cs


示例5: NavigateToURL

		/// <summary>
		/// Navigates the Webview to the given URL string.
		/// </summary>
		/// <param name="url">URL.</param>
		private void NavigateToURL(string url) {

			// Properly formatted?
			if (!url.StartsWith ("http://")) {
				// Add web
				url = "http://" + url;
			}

			// Display the give webpage
			WebView.LoadRequest(new NSUrlRequest(NSUrl.FromString(url)));

			// Invalidate existing Activity
			if (UserActivity != null) {
				UserActivity.Invalidate();
				UserActivity = null;
			}

			// Create a new user Activity to support this tab
			UserActivity = new NSUserActivity (ThisApp.UserActivityTab4);
			UserActivity.Title = "Coffee Break Tab";

			// Update the activity when the tab's URL changes
			var userInfo = new NSMutableDictionary ();
			userInfo.Add (new NSString ("Url"), new NSString (url));
			UserActivity.AddUserInfoEntries (userInfo);

			// Inform Activity that it has been updated
			UserActivity.BecomeCurrent ();

			// Log User Activity
			Console.WriteLine ("Creating User Activity: {0} - {1}", UserActivity.Title, url);
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:36,代码来源:FourthViewController.cs


示例6: SetupLiveCameraStream

        public void SetupLiveCameraStream()
        {
            captureSession = new AVCaptureSession();

            var viewLayer = liveCameraStream.Layer;

            Console.WriteLine(viewLayer.Frame.Width);

            var videoPreviewLayer = new AVCaptureVideoPreviewLayer(captureSession)
            {
                Frame = liveCameraStream.Bounds
            };
            liveCameraStream.Layer.AddSublayer(videoPreviewLayer);

            Console.WriteLine(liveCameraStream.Layer.Frame.Width);

            var captureDevice = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video);
            ConfigureCameraForDevice(captureDevice);
            captureDeviceInput = AVCaptureDeviceInput.FromDevice(captureDevice);

            var dictionary = new NSMutableDictionary();
            dictionary[AVVideo.CodecKey] = new NSNumber((int)AVVideoCodec.JPEG);
            stillImageOutput = new AVCaptureStillImageOutput()
            {
                OutputSettings = new NSDictionary()
            };

            captureSession.AddOutput(stillImageOutput);
            captureSession.AddInput(captureDeviceInput);
            captureSession.StartRunning();

            ViewWillLayoutSubviews();
        }
开发者ID:xmendoza,项目名称:BeerDrinkin,代码行数:33,代码来源:CameraViewController.cs


示例7: TwitterRequest

			public TwitterRequest (string method, Uri url, IDictionary<string, string> paramters, Account account)
				: base (method, url, paramters, account)
			{
				var ps = new NSMutableDictionary ();
				if (paramters != null) {
					foreach (var p in paramters) {
						ps.SetValueForKey (new NSString (p.Value), new NSString (p.Key));
					}
				}

				var m = TWRequestMethod.Get;
				switch (method.ToLowerInvariant()) {
				case "get":
					m = TWRequestMethod.Get;
					break;
				case "post":
					m = TWRequestMethod.Post;
					break;
				case "delete":
					m = TWRequestMethod.Delete;
					break;
				default:
					throw new NotSupportedException ("Twitter does not support the HTTP method '" + method + "'");
				}

				request = new TWRequest (new NSUrl (url.AbsoluteUri), ps, m);

				Account = account;
			}
开发者ID:Willseph,项目名称:Xamarin.Social,代码行数:29,代码来源:Twitter5Service.cs


示例8: ConvertToDictionary

        public static Dictionary<String, Object> ConvertToDictionary(NSMutableDictionary dictionary)
        {
            Dictionary<String,Object> prunedDictionary = new Dictionary<String,Object>();
            foreach (NSString key in dictionary.Keys) {
                NSObject dicValue = dictionary.ObjectForKey(key);

                if (dicValue is NSDictionary) {
                    prunedDictionary.Add (key.ToString(), ConvertToDictionary(new NSMutableDictionary(dicValue as NSDictionary)));
                } else {
                    //SystemLogger.Log(SystemLogger.Module.PLATFORM, "***** key["+key.ToString ()+"] is instance of: " + dicValue.GetType().FullName);
                    if ( ! (dicValue is NSNull)) {
                        if(dicValue is NSString) {
                            prunedDictionary.Add (key.ToString(), ((NSString)dicValue).Description);
                        } else if(dicValue is NSNumber) {
                            prunedDictionary.Add (key.ToString(), ((NSNumber)dicValue).Int16Value);
                        } else if(dicValue is NSArray) {
                            prunedDictionary.Add (key.ToString(), ConvertToArray((NSArray)dicValue));
                        } else {
                            prunedDictionary.Add (key.ToString(), dicValue);
                        }
                    }
                }
            }
            return prunedDictionary;
        }
开发者ID:lsp1357,项目名称:appverse-mobile,代码行数:25,代码来源:PushNotificationsUtils.cs


示例9: ToDictionary

        internal NSDictionary ToDictionary()
        {
            int n = 0;
            if (Enhance.HasValue && Enhance.Value == false)
                n++;
            if (RedEye.HasValue && RedEye.Value == false)
                n++;
            if (ImageOrientation.HasValue)
                n++;
            if (Features != null && Features.Length != 0)
                n++;
            if (n == 0)
                return null;

            NSMutableDictionary dict = new NSMutableDictionary ();

            if (Enhance.HasValue && Enhance.Value == false){
                dict.LowlevelSetObject (CFBoolean.False.Handle, CIImage.AutoAdjustEnhanceKey.Handle);
            }
            if (RedEye.HasValue && RedEye.Value == false){
                dict.LowlevelSetObject (CFBoolean.False.Handle, CIImage.AutoAdjustRedEyeKey.Handle);
            }
            if (Features != null && Features.Length != 0){
                dict.LowlevelSetObject (NSArray.FromObjects (Features), CIImage.AutoAdjustFeaturesKey.Handle);
            }
            if (ImageOrientation.HasValue){
                dict.LowlevelSetObject (new NSNumber ((int)ImageOrientation.Value), CIImage.ImagePropertyOrientation.Handle);
            }
            #if false
            for (i = 0; i < n; i++){
                Console.WriteLine ("{0} {1}-{2}", i, keys [i], values [i]);
            }
            #endif
            return dict;
        }
开发者ID:roblillack,项目名称:maccore,代码行数:35,代码来源:CIImage.cs


示例10: SetOptions

        /// <summary>Sets custom options</summary>
        /// <param name="options">Option mask containing the options you want to set. Available 
        /// options are described 
        /// below at Options enum</param>
        public static void SetOptions(Options options, bool bValue = true)
        {
            var optionsDict = new NSMutableDictionary();
            var strValue = bValue ? new NSString("YES") : new NSString("NO");

            if ((options & Options.DisableAutoDeviceIdentifying) == 0 && isFirstTime) {
                TestFlight.SetDeviceIdentifier(UIDevice.CurrentDevice.UniqueIdentifier);
                isFirstTime = false;
            }

            if ((options & Options.AttachBacktraceToFeedback) != 0) {
                optionsDict.Add (strValue, OptionKeys.AttachBacktraceToFeedback);
            }
            if ((options & Options.DisableInAppUpdates) != 0) {
                optionsDict.Add (strValue, OptionKeys.DisableInAppUpdates);
            }
            if ((options & Options.LogToConsole) != 0) {
                optionsDict.Add (strValue, OptionKeys.LogToSTDERR);
            }
            if ((options & Options.LogToSTDERR) != 0) {
                optionsDict.Add (strValue, OptionKeys.ReinstallCrashHandlers);
            }
            if ((options & Options.SendLogOnlyOnCrash) != 0) {
                optionsDict.Add (strValue, OptionKeys.SendLogOnlyOnCrash);
            }

            TestFlight.SetOptionsRaw(optionsDict);
        }
开发者ID:stelapps,项目名称:monotouch-bindings,代码行数:32,代码来源:extras.cs


示例11: SaveToDictionary

        public static void SaveToDictionary(this IStateBundle state, NSMutableDictionary bundle)
        {
            var formatter = new BinaryFormatter();

            foreach (var kv in state.Data.Where(x => x.Value != null))
            {
                var value = kv.Value;

                if (value.GetType().IsSerializable)
                {
                    using (var stream = new MemoryStream())
                    {
                        formatter.Serialize(stream, value);
                        stream.Position = 0;
                        var bytes = stream.ToArray();
                        var array = new NSMutableArray();
                        foreach (var b in bytes)
                        {
                            array.Add(NSNumber.FromByte(b));
                        }

                        bundle.Add(new NSString(kv.Key), array);
                    }
                }
            }
        }
开发者ID:sgmunn,项目名称:Mobile.Utils,代码行数:26,代码来源:StateBundleExtensions.cs


示例12: GetCrmTasks

		public override async void HandleWatchKitExtensionRequest
	   (UIApplication application, NSDictionary userInfo, Action<NSDictionary> reply)
		{
			if (userInfo.Values[0].ToString() == "gettasks")
			{
				string userId = NSUserDefaults.StandardUserDefaults.StringForKey("UserId");

				List<CrmTask> tasks = await GetCrmTasks(userId);

				var nativeDict = new NSMutableDictionary();
				foreach (CrmTask task in tasks)
				{
					nativeDict.Add((NSString)task.TaskId, (NSString)task.Subject);
				}

				reply(new NSDictionary(
					"count", NSNumber.FromInt32(tasks.Count),
					"tasks", nativeDict
					));
			}
			else if (userInfo.Values[0].ToString() == "closetask")
			{
				string taskId = userInfo.Values[1].ToString();
				CloseTask(taskId);

				reply(new NSDictionary(
					"count", 0,
					"something", 0
					));
			}
		}
开发者ID:jlattimer,项目名称:CrmWatchKit,代码行数:31,代码来源:AppDelegate.cs


示例13: RegisterDefaultSettings

		public static void RegisterDefaultSettings ()
		{
			var path = Path.Combine(NSBundle.MainBundle.PathForResource("Settings", "bundle"), "Root.plist");

			using (NSString keyString = new NSString ("Key"), defaultString = new NSString ("DefaultValue"), preferenceSpecifiers = new NSString ("PreferenceSpecifiers"))
			using (var settings = NSDictionary.FromFile(path))
			using (var preferences = (NSArray)settings.ValueForKey(preferenceSpecifiers))
			using (var registrationDictionary = new NSMutableDictionary ()) {
				for (nuint i = 0; i < preferences.Count; i++)
					using (var prefSpecification = preferences.GetItem<NSDictionary>(i))
					using (var key = (NSString)prefSpecification.ValueForKey(keyString))
						if (key != null)
							using (var def = prefSpecification.ValueForKey(defaultString))
								if (def != null)
									registrationDictionary.SetValueForKey(def, key);

				NSUserDefaults.StandardUserDefaults.RegisterDefaults(registrationDictionary);

				#if DEBUG
				SetSetting(SettingsKeys.UserReferenceKey, debugReferenceKey);
				#else
				SetSetting(SettingsKeys.UserReferenceKey, UIDevice.CurrentDevice.IdentifierForVendor.AsString());
				#endif

				Synchronize();
			}
		}
开发者ID:colbylwilliams,项目名称:Nomads,代码行数:27,代码来源:Settings.cs


示例14: ToDictionary

		internal NSDictionary ToDictionary ()
		{
			var ret = new NSMutableDictionary ();

			if (AffineMatrix.HasValue){
				var a = AffineMatrix.Value;
				var affine = new NSNumber [6];
				affine [0] = NSNumber.FromFloat (a.xx);
				affine [1] = NSNumber.FromFloat (a.yx);
				affine [2] = NSNumber.FromFloat (a.xy);
				affine [3] = NSNumber.FromFloat (a.yy);
				affine [4] = NSNumber.FromFloat (a.x0);
				affine [5] = NSNumber.FromFloat (a.y0);
				ret.SetObject (NSArray.FromNSObjects (affine), CISampler.AffineMatrix);
			}
			if (WrapMode.HasValue){
				var k = WrapMode.Value == CIWrapMode.Black ? CISampler.WrapBlack : CISampler.FilterNearest;
				ret.SetObject (k, CISampler.WrapMode);
			}
			if (FilterMode.HasValue){
				var k = FilterMode.Value == CIFilterMode.Nearest ? CISampler.FilterNearest : CISampler.FilterLinear;
				ret.SetObject (k, CISampler.FilterMode);
			}
			return ret;
		}
开发者ID:kangaroo,项目名称:monomac,代码行数:25,代码来源:CISampler.cs


示例15: WarningWindow

        public WarningWindow()
        {
            // Interface Builder won't allow us to create a window with no title bar
            // so we have to create it manually. But we could use IB if we display
            // the window with a sheet...
            NSRect rect = new NSRect(0, 0, 460, 105);
            m_window = NSWindow.Alloc().initWithContentRect_styleMask_backing_defer(rect, 0, Enums.NSBackingStoreBuffered, false);

            m_window.setHasShadow(false);

            // Initialize the text attributes.
            var dict = NSMutableDictionary.Create();

            NSFont font = NSFont.fontWithName_size(NSString.Create("Georgia"), 64.0f);
            dict.setObject_forKey(font, Externs.NSFontAttributeName);

            NSMutableParagraphStyle style = NSMutableParagraphStyle.Create();
            style.setAlignment(Enums.NSCenterTextAlignment);
            dict.setObject_forKey(style, Externs.NSParagraphStyleAttributeName);

            m_attrs = dict.Retain();

            // Initialize the background bezier.
            m_background = NSBezierPath.Create().Retain();
            m_background.appendBezierPathWithRoundedRect_xRadius_yRadius(m_window.contentView().bounds(), 20.0f, 20.0f);

            m_color = NSColor.colorWithDeviceRed_green_blue_alpha(250/255.0f, 128/255.0f, 114/255.0f, 1.0f).Retain();

            ActiveObjects.Add(this);
        }
开发者ID:andyhebear,项目名称:Continuum,代码行数:30,代码来源:WarningWindow.cs


示例16: DoInitPrefs

 // These are the prefs associated with the app's preferences panel
 // (DirectoryController handles the prefs associated with a directory).
 // Note that we don't include the standard user targets. See:
 // http://www.gnu.org/software/automake/manual/standards/Standard-Targets.html#Standard-Targets
 private void DoInitPrefs(NSMutableDictionary dict)
 {
     string ignores = @"all-am
     am--refresh
     bin
     check-am
     clean-am
     clean-generic
     clean-libtool
     ctags-recursive
     ctags
     CTAGS
     distclean-am
     distclean-generic
     distclean-tags
     distdir
     dist-bzip2
     dist-gzip
     dist-hook
     dist-lzma
     dist-shar
     dist-tarZ
     dist-zip
     distclean-hdr
     distclean-libtool
     dvi-am
     extra-bin
     GTAGS
     ID
     info-am
     install-am
     install-binSCRIPTS
     install-data-am
     install-data
     install-exec-am
     install-exec
     install-pixmapDATA
     installcheck-am
     installdirs-am
     maintainer-clean-am
     maintainer-clean-generic
     maintainer-clean-recursive
     Makefile
     mostlyclean-am
     mostlyclean-generic
     mostlyclean-libtool
     pdf-am
     push
     ps-am
     stamp-h1
     tags-recursive
     uninstall-am
     uninstall-binSCRIPTS
     uninstall-info-am
     uninstall-info
     uninstall-pixmapDATA
     zip-bin";
     dict.setObject_forKey(NSString.Create(ignores), NSString.Create("globalIgnores"));
 }
开发者ID:andyhebear,项目名称:Continuum,代码行数:63,代码来源:Startup.cs


示例17: Initialize

		// Shared initialization code
		void Initialize ()
		{
			repeatCount = 1;

			var font = NSFont.UserFixedPitchFontOfSize (16);
			textAttrs = new NSMutableDictionary ();
			textAttrs.SetValueForKey (font, NSAttributedString.FontAttributeName);
		}
开发者ID:RafasTavares,项目名称:mac-samples,代码行数:9,代码来源:BenchmarkViewController.cs


示例18: submitAchievement

		public void submitAchievement(string identifier, double percentComplete, string achievementName)
		{
			if(earnedAchievementCache == null)
			{
				GKAchievement.LoadAchievements (new GKCompletionHandler (delegate(GKAchievement[] achievements, NSError error) {
					NSMutableDictionary tempCache = new NSMutableDictionary();
					if(achievements !=null)
					{
						foreach(var achievement in achievements)
						{
							tempCache.Add(new NSString(achievement.Identifier), achievement);
						}
					}
					earnedAchievementCache = tempCache;
					submitAchievement(identifier,percentComplete,achievementName);
				}));
			}
			else
			{
				GKAchievement achievement =(GKAchievement) earnedAchievementCache.ValueForKey (new NSString(identifier));
				if (achievement != null)
				{

					if (achievement.PercentComplete >= 100.0 || achievement.PercentComplete >= percentComplete) 
					{
						achievement = null;
					}
					else
						achievement.PercentComplete = percentComplete;
				}
				else
				{
					achievement = new GKAchievement(identifier);
					achievement.PercentComplete = percentComplete;
					earnedAchievementCache.Add(new NSString(achievement.Identifier),achievement);
				}
				if(achievement != null)
				{
					achievement.ReportAchievement (new GKNotificationHandler (delegate(NSError error) {
						if(error == null && achievement != null)
						{
							if(percentComplete == 100)
							{
								new UIAlertView ("Achievement Earned", "Great job!  You earned an achievement: " + achievementName, null, "OK", null).Show ();
							}
							else if(percentComplete >0)
							{
								new UIAlertView ("Achievement Progress", "Great job!  You're "+percentComplete+" % of the way to " + achievementName, null, "OK", null).Show ();
							}
						}
						else
						{
							new UIAlertView ("Achievement submittion failed", "Submittion failed because: " + error, null, "OK", null).Show ();
						}
					}));
				}
			}
		}
开发者ID:GSerjo,项目名称:monotouch-samples,代码行数:58,代码来源:GameCenterManager.cs


示例19: ToDictionary

		//public bool? ProtectedFile { get; set; }
		
		internal NSDictionary ToDictionary ()
		{
			var dict = new NSMutableDictionary ();
			if (AppendOnly.HasValue)
				dict.SetObject (NSNumber.FromBoolean (AppendOnly.Value), NSFileManager.AppendOnly);
			if (Busy.HasValue)
				dict.SetObject (NSNumber.FromBoolean (Busy.Value), NSFileManager.Busy);
			if (CreationDate != null)
				dict.SetObject (CreationDate, NSFileManager.CreationDate);
			if (ModificationDate != null)
				dict.SetObject (ModificationDate, NSFileManager.ModificationDate);
			if (OwnerAccountName != null)
				dict.SetObject (new NSString (OwnerAccountName), NSFileManager.OwnerAccountName);
			if (DeviceIdentifier.HasValue)
				dict.SetObject (NSNumber.FromUInt32 (DeviceIdentifier.Value), NSFileManager.DeviceIdentifier);
			if (FileExtensionHidden.HasValue)
				dict.SetObject (NSNumber.FromBoolean (FileExtensionHidden.Value), NSFileManager.ExtensionHidden);
			if (FileGroupOwnerAccountID.HasValue)
				dict.SetObject (NSNumber.FromUInt32 (FileGroupOwnerAccountID.Value), NSFileManager.GroupOwnerAccountID);
			if (FileOwnerAccountID.HasValue)
				dict.SetObject (NSNumber.FromUInt32 (FileOwnerAccountID.Value), NSFileManager.OwnerAccountID);
			if (HfsTypeCode.HasValue)
				dict.SetObject (NSNumber.FromUInt32 (HfsTypeCode.Value), NSFileManager.HfsTypeCode);
			if (PosixPermissions.HasValue)
				dict.SetObject (NSNumber.FromUInt32 (PosixPermissions.Value), NSFileManager.PosixPermissions);
			if (FileReferenceCount.HasValue)
				dict.SetObject (NSNumber.FromUInt32 (FileReferenceCount.Value), NSFileManager.ReferenceCount);
			if (FileSystemFileNumber.HasValue)
				dict.SetObject (NSNumber.FromUInt32 (FileSystemFileNumber.Value), NSFileManager.SystemFileNumber);
			if (FileSize.HasValue)
				dict.SetObject (NSNumber.FromUInt64 (FileSize.Value), NSFileManager.Size);
			if (Immutable.HasValue)
				dict.SetObject (NSNumber.FromBoolean (Immutable.Value), NSFileManager.Immutable);
			//if (ProtectedFile.HasValue)
			//dict.SetObject (NSNumber.FromBoolean (ProtectedFile.Value), NSFileManager.ProtectedFile);
			if (FileType.HasValue){
				NSString v = null;
				switch (FileType.Value){
				case NSFileType.Directory:
					v = NSFileManager.TypeDirectory; break;
				case NSFileType.Regular:
					v = NSFileManager.TypeRegular; break;
				case NSFileType.SymbolicLink:
					v = NSFileManager.TypeSymbolicLink; break;
				case NSFileType.Socket:
					v = NSFileManager.TypeSocket; break;
				case NSFileType.CharacterSpecial:
					v = NSFileManager.TypeCharacterSpecial; break;
				case NSFileType.BlockSpecial:
					v = NSFileManager.TypeBlockSpecial; break;
				default:
					v = NSFileManager.TypeUnknown; break;
				}
				dict.SetObject (v, NSFileManager.NSFileType);
			}
			return dict;
		}
开发者ID:Anomalous-Software,项目名称:maccore,代码行数:59,代码来源:NSFileManager.cs


示例20: TableViewSource

		//========================================================================================================================================
		//  PUBLIC CLASS PROPERTIES
		//========================================================================================================================================
		//========================================================================================================================================
		//  Constructor
		//========================================================================================================================================
		/// <summary>
		/// Initializes a new instance of the <see cref="TableViewSource"/> class.
		/// </summary>
		public TableViewSource ()
		{
			this.dpc = new DatePickerCell ();
			this.dsc = new DateShowerCell ();
			dpc.didUpdateDatePicker += dsc.updateCellText;
			heightAtIndexPath = new Foundation.NSMutableDictionary ();
			this.showDatePicker = false;
			numRows = 2;
		}
开发者ID:CheezeCoder,项目名称:AaronBratcher_TableViewHelper_Xamarin,代码行数:18,代码来源:TableViewSource.cs



注:本文中的NSMutableDictionary类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NSNotification类代码示例发布时间:2022-05-24
下一篇:
C# NSMutableArray类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap