本文整理汇总了C#中Poker.GetProperties方法的典型用法代码示例。如果您正苦于以下问题:C# Poker.GetProperties方法的具体用法?C# Poker.GetProperties怎么用?C# Poker.GetProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poker
的用法示例。
在下文中一共展示了Poker.GetProperties方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Properties
public void Properties () {
Poker p1 = new Poker ();
Poker p2 = new Poker ();
Assert.AreEqual (false, p1.GetProperties ().Contains ("myProperty"), "Contains myProperty");
Assert.AreEqual (false, p1.GetProperties () == p2.GetProperties (), "#");
}
示例2: Properties
public void Properties ()
{
Poker p = new Poker ("name", "value");
ConfigurationPropertyCollection props = p.GetProperties();
Assert.IsNotNull (props, "A1");
Assert.AreEqual (2, props.Count, "A2");
ConfigurationProperty prop;
prop = props["key"];
Assert.AreEqual ("key", prop.Name, "A3");
Assert.IsNull (prop.Description, "A4");
Assert.AreEqual (typeof (string), prop.Type, "A5");
Assert.AreEqual (typeof (StringConverter), prop.Converter.GetType(), "A6");
Assert.IsNotNull (prop.Validator, "Anull");
Assert.AreEqual (typeof (DefaultValidator), prop.Validator.GetType(), "A7");
Assert.AreEqual ("", prop.DefaultValue, "A8");
Assert.IsTrue (prop.IsKey, "A9");
Assert.IsTrue (prop.IsRequired, "A10");
Assert.IsFalse (prop.IsDefaultCollection, "A11");
prop = props["value"];
Assert.AreEqual ("value", prop.Name, "A12");
Assert.IsNull (prop.Description, "A13");
Assert.AreEqual (typeof (string), prop.Type, "A14");
Assert.AreEqual (typeof (StringConverter), prop.Converter.GetType(), "A15");
Assert.AreEqual (typeof (DefaultValidator), prop.Validator.GetType(), "A16");
Assert.AreEqual ("", prop.DefaultValue, "A17");
Assert.IsFalse (prop.IsKey, "A18");
Assert.IsFalse (prop.IsRequired, "A19");
Assert.IsFalse (prop.IsDefaultCollection, "A20");
}
示例3: Properties
public void Properties ()
{
Poker p = new Poker ();
ConfigurationPropertyCollection props = p.GetProperties();
Assert.IsNotNull (props, "A1");
Assert.AreEqual (0, props.Count, "A2");
}