public IComponent GetLastPublishedComponent(string schemaUri) { var serializer = new XmlSerializer(typeof(Component)); string component; using (var client = new TridionBrokerServiceClient()) { component = client.GetLastPublishedComponent(schemaUri); } IComponent deserializedComponent = (IComponent)serializer.Deserialize(new StringReader(component)); return(deserializedComponent); }
public IComponent GetLastPublishedComponent(string schemaUri) { var serializer = new XmlSerializer(typeof(Component)); string component; using (var client = new TridionBrokerServiceClient()) { component = client.GetLastPublishedComponent(schemaUri); } IComponent deserializedComponent = (IComponent)serializer.Deserialize(new StringReader(component)); return deserializedComponent; }