public IDictionary<string, IComponentMeta> FindComponentMetas(string[] schemaUris) { int pubId = new TcmUri(schemaUris.First()).PublicationId; string[] componentMetas; using (var client = new TridionBrokerServiceClient()) { componentMetas = client.FindComponentMetasBySchemas(schemaUris); } return componentMetas .Select(metaXml => XElement.Parse(metaXml)) .ToDictionary(k => String.Format("tcm:{0}-{1}", pubId, k.Element("Id").Value), v => CreateComponentMeta(v)); }
public IDictionary <string, IComponentMeta> FindComponentMetas(string[] schemaUris) { int pubId = new TcmUri(schemaUris.First()).PublicationId; string[] componentMetas; using (var client = new TridionBrokerServiceClient()) { componentMetas = client.FindComponentMetasBySchemas(schemaUris); } return (componentMetas .Select(metaXml => XElement.Parse(metaXml)) .ToDictionary(k => String.Format("tcm:{0}-{1}", pubId, k.Element("Id").Value), v => CreateComponentMeta(v))); }