Example #1
0
 public static DnnDesktopModule FromAttribute(DnnDesktopModuleAttribute attribute)
 {
     return(new DnnDesktopModule(attribute.ModuleName)
     {
         FolderName = attribute.FolderName, IsAdmin = attribute.IsAdmin, IsPremium = attribute.IsPremium
     });
 }
        /// <summary>
        /// Creates the desktop module from attribute.
        /// </summary>
        /// <param name="attribute">The attribute.</param>
        /// <returns></returns>
        private DnnDesktopModule CreateDesktopModuleFromAttribute(DnnDesktopModuleAttribute attribute)
        {
            if (!this.DesktopModules.ContainsKey(attribute.ModuleName))
            {
                this.DesktopModules.Add(attribute.ModuleName, DnnDesktopModule.FromAttribute(attribute));
            }

            return(this.DesktopModules[attribute.ModuleName]);
        }