コード例 #1
0
        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));
        }
コード例 #2
0
        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)));
        }