Exemplo n.º 1
0
 public static webModels.ThemeAssetFolder ToThemeFolderWebModel(this BlobFolder blobFolder)
 {
     var retVal = new webModels.ThemeAssetFolder();
     retVal.FolderName = blobFolder.Name;
     return retVal;
 
 }
Exemplo n.º 2
0
        public static webModels.ThemeAssetFolder ToThemeFolderWebModel(this BlobFolder blobFolder)
        {
            var retVal = new webModels.ThemeAssetFolder();

            retVal.FolderName = blobFolder.Name;
            return(retVal);
        }
		public static webModels.ThemeAssetFolder[] ToWebModel(this IEnumerable<domainModels.ThemeAsset> items)
		{
			var retVal = new List<webModels.ThemeAssetFolder>();

			var folders = items.Select(i => i.Id.Split('/')[0]).Distinct();

			foreach (var folder in folders)
			{
				var themeAssetFolder = new webModels.ThemeAssetFolder
				{
					FolderName = folder
				};

				themeAssetFolder.Assets.AddRange(items.Select(i => i.ToWebModel(false)).Where(i => i.Id.StartsWith(string.Format("{0}/", folder))));

				retVal.Add(themeAssetFolder);
			}

			return retVal.ToArray();
		}
Exemplo n.º 4
0
        public static webModels.ThemeAssetFolder[] ToWebModel(this IEnumerable <domainModels.ThemeAsset> items)
        {
            var retVal = new List <webModels.ThemeAssetFolder>();

            var folders = items.Select(i => i.Id.Split('/')[0]).Distinct();

            foreach (var folder in folders)
            {
                var themeAssetFolder = new webModels.ThemeAssetFolder
                {
                    FolderName = folder
                };

                themeAssetFolder.Assets.AddRange(items.Select(i => i.ToWebModel(false)).Where(i => i.Id.StartsWith(string.Format("{0}/", folder))));

                retVal.Add(themeAssetFolder);
            }

            return(retVal.ToArray());
        }