コード例 #1
0
        public void GetBoolean_ReturnsValue()
        {
            var dict = new NSDictionary();

            dict.Add("key", new NSNumber(true));

            Assert.True(dict.GetBoolean("key"));
        }
コード例 #2
0
 /// <inheritdoc/>
 public override void FromDictionary(NSDictionary dictionary)
 {
     base.FromDictionary(dictionary);
     this.Goodbye = dictionary.GetBoolean(nameof(this.Goodbye));
 }
コード例 #3
0
        public void GetBoolean_MissingKey_Throws()
        {
            var dict = new NSDictionary();

            Assert.Throws <KeyNotFoundException>(() => dict.GetBoolean("missing"));
        }