本文整理汇总了C#中Hl7.Fhir.Model.List.Select方法的典型用法代码示例。如果您正苦于以下问题:C# List.Select方法的具体用法?C# List.Select怎么用?C# List.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hl7.Fhir.Model.List
的用法示例。
在下文中一共展示了List.Select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadGenericSearchParameters
private void LoadGenericSearchParameters()
{
var genericSearchParamDefinitions = new List<ModelInfo.SearchParamDefinition>
{
new ModelInfo.SearchParamDefinition { Resource = "Resource", Name = "_id", Type = SearchParamType.String, Path = new string[] { "Resource.id" } }
, new ModelInfo.SearchParamDefinition { Resource = "Resource", Name = "_lastUpdated", Type = SearchParamType.Date, Path = new string[] { "Resource.meta.lastUpdated" } }
, new ModelInfo.SearchParamDefinition { Resource = "Resource", Name = "_profile", Type = SearchParamType.Token, Path = new string[] { "Resource.meta.profile" } }
, new ModelInfo.SearchParamDefinition { Resource = "Resource", Name = "_security", Type = SearchParamType.Token, Path = new string[] { "Resource.meta.security" } }
, new ModelInfo.SearchParamDefinition { Resource = "Resource", Name = "_tag", Type = SearchParamType.Token, Path = new string[] { "Resource.meta.tag" } }
};
//CK: Below is how it should be, once SearchParameter has proper support for Composite parameters.
//var genericSearchParameters = new List<SearchParameter>
//{
// new SearchParameter { Base = "Resource", Code = "_id", Name = "_id", Type = SearchParamType.String, Xpath = "//id"}
// , new SearchParameter { Base = "Resource", Code = "_lastUpdated", Name = "_lastUpdated", Type = SearchParamType.Date, Xpath = "//meta/lastUpdated"}
// , new SearchParameter { Base = "Resource", Code = "_profile", Name = "_profile", Type = SearchParamType.Token, Xpath = "//meta/profile"}
// , new SearchParameter { Base = "Resource", Code = "_security", Name = "_security", Type = SearchParamType.Token, Xpath = "//meta/security"}
// , new SearchParameter { Base = "Resource", Code = "_tag", Name = "_tag", Type = SearchParamType.Token, Xpath = "//meta/tag"}
//};
//Not implemented (yet): _query, _text, _content
var genericSearchParameters = genericSearchParamDefinitions.Select(spd => createSearchParameterFromSearchParamDefinition(spd));
_searchParameters.AddRange(genericSearchParameters.Except(_searchParameters));
//We have no control over the incoming list of searchParameters (in the constructor), so these generic parameters may or may not be in there.
//So we apply the Except operation to make sure these parameters are not added twice.
}
示例2: describeTypes
private String describeTypes(Profile profile, List<Profile.TypeRefComponent> types)
{
if (types == null || !types.Any()) return null;
if (types.Count == 1)
return describeType(profile, types[0]);
else
{
return "Choice of: " +
String.Join(", ", types.Select(t => describeType(profile, t)));
}
}