private static List <ResourceReference> SetProfiles(AbstractStructureDefinitionService abstractStructureDefinitionService) { var structureDefinitions = abstractStructureDefinitionService.GetStructureDefinitions(); var profiles = structureDefinitions.Select(structureDefinition => new ResourceReference { Url = new Uri(structureDefinition.Url) }).ToList(); return(profiles); }
private StructureDefinition Load(bool excactMatch, string id, string nspace = null) { string lookup; if (string.IsNullOrEmpty(nspace)) { lookup = id; } else { lookup = nspace + "/" + id; } var structureDefinitions = _abstractStructureDefinitionService.GetStructureDefinitions(); return(excactMatch ? structureDefinitions.FirstOrDefault(definition => definition.Type.Equals(lookup)) : structureDefinitions.FirstOrDefault(definition => definition.Url.EndsWith(lookup))); }