Clean up obsolete functions
Hello,
please provide correct way to fix following obsolete functions:
1.
public override IEnumerable<PortfolioItemViewModel> GetViewModelList(IEnumerable<PortfolioItem> contentList, ContentDataProviderBase dataProvider) warning CS0672: Member 'PortfolioItemsModule.Web.Services.PortfolioItemsBackendService.GetViewModelList(System.Collections.Generic.IEnumerable<PortfolioItemsModule.Model.PortfolioItem>, Telerik.Sitefinity.Modules.GenericContent.ContentDataProviderBase)' overrides obsolete member 'Telerik.Sitefinity.Modules.ContentServiceBase<PortfolioItemsModule.Model.PortfolioItem,PortfolioItemsModule.Model.PortfolioItem,PortfolioItemsModule.Web.Services.Data.PortfolioItemViewModel,PortfolioItemsModule.Web.Services.Data.PortfolioItemViewModel,PortfolioItemsModule.Data.PortfolioItemsManager>.GetViewModelList(System.Collections.Generic.IEnumerable<PortfolioItemsModule.Model.PortfolioItem>, Telerik.Sitefinity.Modules.GenericContent.ContentDataProviderBase)'. Add the Obsolete attribute to 'PortfolioItemsModule.Web.Services.PortfolioItemsBackendService.GetViewModelList(System.Collections.Generic.IEnumerable<PortfolioItemsModule.Model.PortfolioItem>, Telerik.Sitefinity.Modules.GenericContent.ContentDataProviderBase)' 2.public class PortfolioItemsManager: ContentManagerBase<OpenAccessPortfolioItemsDataProvider>, IContentLifecycleManager<PortfolioItem>c:\Development\Projects\webbywell\website2\PortfolioItemsModule\Data\PortfolioItemsManager.cs(17,18): warning CS0618: 'Telerik.Sitefinity.IContentLifecycleManager<PortfolioItemsModule.Model.PortfolioItem>' is obsolete: 'Use Telerik.Sitefinity.Lifecycle.ILifecycleManager' Comment: my project doesn't implement Lifecycle so far. It just defines IContentLifecycleManager I found two new ILifecyclemanager interfaces.
Telerik.Sitefinity.Lifecycle.ILifecycleManager and I Telerik.Sitefinity.Lifecycle.ILifecycleManager<TItem, TDraft> which should be implemented in my case?
3.RegularExpression = DefinitionsHelper.UrlRegularExpressionFilterForValidator,
c:\Development\Projects\webbywell\website2\PortfolioItemsModule\Web\UI\PortfolioItemsDefinitions.cs(586,41): warning CS0612: 'Telerik.Sitefinity.Modules.DefinitionsHelper.UrlRegularExpressionFilterForValidator' is obsolete
4.// create control panel var backendView = new BackendContentView() c:\Development\Projects\webbywell\website2\PortfolioItemsModule\PortfolioItemsModule.cs(120,39): warning CS0618: 'Telerik.Sitefinity.Web.UI.ContentUI.BackendContentView' is obsolete: 'Remove this class once the ControlBuilders can correctly instantiate standard ContentView control.'Thanks, Denis.
5.initializer.CreatePageFromConfiguration(pageInfo, portfolioItemsModulePageGroupNode, backendView);c:\Development\Projects\webbywell\website2\PortfolioItemsModule\PortfolioItemsModule.cs(127,17): warning CS0618: 'Telerik.Sitefinity.Abstractions.SiteInitializer.CreatePageFromConfiguration(Telerik.Sitefinity.Modules.Pages.Configuration.PageElement, Telerik.Sitefinity.Pages.Model.PageNode, params System.Web.UI.Control[])' is obsolete: 'Use fluent API App.WorkWith().Module().Install() instead.'
Some cases maybe obvious but that would be nice if someone confirm how people should handle obsolete cases like these.
Hi Denis,
1. There are two methods with name GetViewModelList in ContentServiceBase. One is obsolete (with 2 arguments) and one is OK (with 4 arguments). Use the one with 4 arguments instead. The full method signature is
public
virtual
IEnumerable<TContentViewModel> GetViewModelList(IEnumerable<TContent> contentList, ContentDataProviderBase dataProvider, IDictionary<Guid, TContent> liveContentDictionary, IDictionary<Guid, TContent> tempContentDictionary)