public IList<IComponent> FindComponents(string schemaUri)
        {
            var serializer = new XmlSerializer(typeof(Component));
            string[] components;

            using (var client = new TridionBrokerServiceClient())
            {
                components = client.FindComponentsBySchema(schemaUri);
            }

            List<IComponent> deserializedComponents = components
                .Select(component => (IComponent)serializer.Deserialize(new StringReader(component)))
                .ToList();
            return deserializedComponents;
        }
Пример #2
0
        public IList <IComponent> FindComponents(string schemaUri)
        {
            var serializer = new XmlSerializer(typeof(Component));

            string[] components;

            using (var client = new TridionBrokerServiceClient())
            {
                components = client.FindComponentsBySchema(schemaUri);
            }

            List <IComponent> deserializedComponents = components
                                                       .Select(component => (IComponent)serializer.Deserialize(new StringReader(component)))
                                                       .ToList();

            return(deserializedComponents);
        }