本文整理汇总了C#中Hl7.Fhir.Model.List.Any方法的典型用法代码示例。如果您正苦于以下问题:C# List.Any方法的具体用法?C# List.Any怎么用?C# List.Any使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hl7.Fhir.Model.List
的用法示例。
在下文中一共展示了List.Any方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Validate
public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var result = new List<ValidationResult>();
result.AddRange(base.Validate(validationContext));
if (When == null)
result.Add(new ValidationResult("A DeletedEntry must have a non-null deletion time (When)"));
if (!result.Any()) result.Add(ValidationResult.Success);
return result;
}
示例2: NonUcumIndexedExpression
public static Expression NonUcumIndexedExpression(this FM.Quantity quantity)
{
var values = new List<ValueExpression>();
if (quantity.System != null)
values.Add(new IndexValue("system", new StringValue(quantity.System)));
if (quantity.Unit != null)
values.Add(new IndexValue("unit", new StringValue(quantity.Unit)));
if (quantity.Value.HasValue)
values.Add(new IndexValue("value", new NumberValue(quantity.Value.Value)));
if (values.Any())
return new CompositeValue(values);
return null;
}
示例3: Validate
public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var result = new List<ValidationResult>();
result.AddRange(base.Validate(validationContext));
if (!result.Any()) result.Add(ValidationResult.Success);
return result;
}
示例4: describeInvariants
private String describeInvariants(List<Profile.ElementDefinitionConstraintComponent> constraints)
{
if (constraints == null || !constraints.Any())
return null;
StringBuilder s = new StringBuilder();
if (constraints.Count > 0)
{
s.Append("<b>Defined on this element</b><br/>\r\n");
var b = false;
foreach (var inv in constraints.OrderBy(constr => constr.Key))
{
if (b)
s.Append("<br/>");
else
b = true;
s.Append("<b title=\"Formal Invariant Identifier\">Inv-" + inv.Key + "</b>: " + WebUtility.HtmlEncode(inv.Human) +
" (xpath: " + WebUtility.HtmlEncode(inv.Xpath) + ")");
}
}
return s.ToString();
}
示例5: 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)));
}
}