本文整理汇总了C#中FhirClient.AffixTags方法的典型用法代码示例。如果您正苦于以下问题:C# FhirClient.AffixTags方法的具体用法?C# FhirClient.AffixTags怎么用?C# FhirClient.AffixTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FhirClient
的用法示例。
在下文中一共展示了FhirClient.AffixTags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadTags
public void ReadTags()
{
FhirClient client = new FhirClient(testEndpoint);
var tags = new List<Tag>() { new Tag("http://readtag.nu.nl", Tag.FHIRTAGNS, "readTagTest") };
client.AffixTags(tags, ResourceType.Location, "1");
var list = client.GetTags();
Assert.IsTrue(list.Any(t => t == tags.First()));
list = client.GetTags(ResourceType.Location);
Assert.IsTrue(list.Any(t => t == tags.First()));
list = client.GetTags(ResourceType.Location, "1", "1");
Assert.IsTrue(list.Any(t => t == tags.First()));
client.DeleteTags(tags, ResourceType.Location, "1", "1");
list = client.GetTags();
Assert.IsFalse(list.Any(t => t == tags.First()));
}
示例2: ReadTags
public void ReadTags()
{
FhirClient client = new FhirClient(testEndpoint);
var tags = new List<Tag>() { new Tag("http://readtag.nu.nl", Tag.FHIRTAGSCHEME_GENERAL, "readTagTest") };
var identity = ResourceIdentity.Build("Location", "1");
client.AffixTags(identity, tags);
var affixedEntry = client.Read(identity);
IEnumerable<Tag> list;
//BP/EK: Our server can't yet do this (as noted above in the history test)
// list = client.WholeSystemTags();
// Assert.IsTrue(list.Any(t => t.Equals(tags.First())));
list = client.TypeTags<Location>();
Assert.IsTrue(list.Any(t => t.Equals(tags.First())));
list = client.Tags(affixedEntry.SelfLink);
Assert.IsTrue(list.Any(t => t.Equals(tags.First())));
// BP: Furore server having issues with this at present (17 April 2014)
// causes the test to fail
client.DeleteTags(affixedEntry.SelfLink, tags);
//TODO: verify tags have really been removed. Should generate random tag so this is repeatable
}