本文整理汇总了C#中Person.ToXCN方法的典型用法代码示例。如果您正苦于以下问题:C# Person.ToXCN方法的具体用法?C# Person.ToXCN怎么用?C# Person.ToXCN使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Person
的用法示例。
在下文中一共展示了Person.ToXCN方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FromXonXcnMissingInstition
public static void FromXonXcnMissingInstition()
{
Person p = new Person { First = "Bob", Last = "Smith", Degree = "MD" };
string xonxcn = String.Format("|{0}", p.ToXCN());
Recipient r = Recipient.FromXONXCNXTN(xonxcn);
Assert.Equal(p, r.Person);
Assert.Null(r.Institution);
}
示例2: MarcusWelbyToXCN
public void MarcusWelbyToXCN()
{
Person p = new Person { First = "Marcus", Last = "Welby", Degree = "M.D.", Prefix = "Dr." };
Assert.Equal("^Welby^Marcus^^^Dr.^M.D.", p.ToXCN());
}
示例3: ToSourcePatientInfoReturnsCorrectNameValue
public void ToSourcePatientInfoReturnsCorrectNameValue()
{
Person p = new Person { First = "Bob", Last = "Smith", MI = "A" };
Assert.Contains("PID-5|" + p.ToXCN(), p.ToSourcePatientInfoValues(null));
}
示例4: EmptyPerson
public void EmptyPerson()
{
Person p = new Person();
Assert.Equal("", p.ToString());
Assert.Equal("^^^^^^", p.ToXCN());
}
示例5: FromXonXcnWorksForSimpleCase
public static void FromXonXcnWorksForSimpleCase()
{
Person p = new Person { First = "Bob", Last = "Smith", Degree = "MD" };
Institution i = new Institution("Abc", "123");
string xonxcn = String.Format("{0}|{1}", i.ToXON(), p.ToXCN());
Recipient r = Recipient.FromXONXCNXTN(xonxcn);
Assert.Equal(p, r.Person);
Assert.Equal(i, r.Institution);
}