public Folder GetFolder(ISiteSetting siteSetting, BasicFolderDefinition folderDefinition) { ISharePointService spService = new SharePointService(); if (typeof(SPList).FullName.Equals(folderDefinition.FolderType, StringComparison.OrdinalIgnoreCase) == true) { return(spService.GetList(siteSetting, folderDefinition.FolderUrl)); } else if (typeof(SPWeb).FullName.Equals(folderDefinition.FolderType, StringComparison.OrdinalIgnoreCase) == true) { return(spService.GetWeb(siteSetting, folderDefinition.FolderUrl)); } else { return(spService.GetFolder(siteSetting, folderDefinition.FolderUrl)); } }