/// <inheritdoc/> public NSDictionary ToDictionary() { var dict = new NSDictionary(); dict.Add(nameof(this.Request), this.Request); dict.AddWhenNotNull(nameof(this.EntryName), this.EntryName); dict.AddWhenNotNull(nameof(this.EntryClass), this.EntryClass); dict.AddWhenNotNull(nameof(this.WaitForDisconnect), this.WaitForDisconnect); return(dict); }
public void AddWhenNotNull_Works() { var dict = new NSDictionary(); dict.AddWhenNotNull("null", null); dict.AddWhenNotNull("notnull", string.Empty); var key = Assert.Single(dict.Keys); Assert.Equal("notnull", key); }