private List <WriteResultItem> WriteResources(Enums.ResourceType resourceType, IEnumerable <XmlResource> resources) { Handler handler = PublicApiAdapter.CreateAdapterForDefaultConnection().Write(resources.ToList(), urlParameters: null); List <WriteResultItem> result = XmlHelper.ParseXMLString <List <WriteResultItem> >(handler.RawContent); cleaner.DeleteMany(resourceType, result?.Select(item => item.Code.ToString()).Where(code => code == Enums.PublicAPIResultCode.Success.ToString()).ToList()); return(result); }