예제 #1
0
        public static string GetBluePrintTopTcmId(IAlchemyCoreServiceClient client, string id)
        {
            if (id.StartsWith("tcm:0-"))
            {
                return(id);
            }

            var list = client.GetSystemWideList(new BluePrintFilterData {
                ForItem = new LinkToRepositoryLocalObjectData {
                    IdRef = id
                }
            });

            if (list == null || list.Length == 0)
            {
                return(id);
            }

            var list2 = list.Cast <BluePrintNodeData>().Where(x => x.Item != null).ToList();

            return(list2.First().Item.Id);
        }
예제 #2
0
        public static List <MultimediaTypeData> GetMimeTypes(IAlchemyCoreServiceClient client, string[] mimeTypes)
        {
            List <MultimediaTypeData> allMimeTypes = client.GetSystemWideList(new MultimediaTypesFilterData()).Cast <MultimediaTypeData>().ToList();

            return(allMimeTypes.Where(x => mimeTypes.Contains(x.MimeType)).ToList());
        }