本文整理汇总了C#中IKey.ToUriString方法的典型用法代码示例。如果您正苦于以下问题:C# IKey.ToUriString方法的具体用法?C# IKey.ToUriString怎么用?C# IKey.ToUriString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IKey
的用法示例。
在下文中一共展示了IKey.ToUriString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteMetaData
public void WriteMetaData(IKey key, int level, Resource resource)
{
if (level == 0)
{
document.Write(InternalField.ID, document.RootId);
string selflink = key.ToUriString();
document.Write(InternalField.SELFLINK, selflink);
document.Write(InternalField.JUSTID, key.ResourceId);
/*
//For testing purposes:
string term = resloc.Id;
List<Tag> tags = new List<Tag>() { new Tag(term, "http://tags.hl7.org", "labello"+term) } ;
tags.ForEach(Collect);
/* */
// DSTU2: tags
//if (entry.Tags != null)
//{
// entry.Tags.ToList().ForEach(Collect);
//}
}
else
{
string id = resource.Id;
document.Write(InternalField.ID, document.RootId + "#" + id);
}
string category = resource.TypeName;
//ModelInfo.GetResourceNameForType(resource.GetType()).ToLower();
document.Write(InternalField.RESOURCE, category);
document.Write(InternalField.LEVEL, level);
}
示例2: AddMetaParts
private void AddMetaParts(Resource resource, IKey key, IndexValue entry)
{
entry.Values.Add(new IndexValue("internal_forResource", new StringValue(key.ToUriString())));
entry.Values.Add(new IndexValue(IndexFieldNames.RESOURCE, new StringValue(resource.TypeName)));
entry.Values.Add(new IndexValue(IndexFieldNames.ID, new StringValue(resource.TypeName + "/" + key.ResourceId)));
entry.Values.Add(new IndexValue(IndexFieldNames.JUSTID, new StringValue(resource.Id)));
entry.Values.Add(new IndexValue(IndexFieldNames.SELFLINK, new StringValue(key.ToUriString()))); //CK TODO: This is actually Mongo-specific. Move it to Spark.Mongo, but then you will have to communicate the key to the MongoIndexMapper.
//var fdt = resource.Meta?.LastUpdated != null ? new FhirDateTime(resource.Meta.LastUpdated.Value) : FhirDateTime.Now();
//entry.Values.Add(new IndexValue(IndexFieldNames.LASTUPDATED, (_elementIndexer.Map(fdt))));
}