本文整理汇总了C#中PropertyList.CreateNew方法的典型用法代码示例。如果您正苦于以下问题:C# PropertyList.CreateNew方法的具体用法?C# PropertyList.CreateNew怎么用?C# PropertyList.CreateNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyList
的用法示例。
在下文中一共展示了PropertyList.CreateNew方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateNewPropertyWithBestInitialValues_InitialListTest
public void CreateNewPropertyWithBestInitialValues_InitialListTest()
{
var properties = new PropertyList();
var newProperty = properties.CreateNew(_classifiers);
Assert.AreEqual("New Property 1", newProperty.Name);
Assert.AreEqual(String, newProperty.Type);
}
示例2: CreateNewPropertyWithBestInitialValues_DifferentNameTest
public void CreateNewPropertyWithBestInitialValues_DifferentNameTest()
{
var properties = new PropertyList();
properties.CreateProperty("New Property 1", String);
properties.CreateProperty("Name", String);
var newProperty = properties.CreateNew(_classifiers);
Assert.AreEqual("New Property 2", newProperty.Name);
Assert.AreEqual(String, newProperty.Type);
}
示例3: CreateNewPropertyWithBestInitialValues_TypeTest
public void CreateNewPropertyWithBestInitialValues_TypeTest()
{
var properties = new PropertyList();
properties.CreateProperty("New Property 1", Integer);
properties.CreateProperty("New Property 2", Integer);
properties.CreateProperty("New Property 3", String);
var newProperty = properties.CreateNew(_classifiers);
Assert.AreEqual("New Property 4", newProperty.Name);
Assert.AreEqual(Integer, newProperty.Type);
}