Table of Contents

Class ResourceInfoProvider

Namespace
CMS.Modules
Assembly
CMS.Modules.dll

Provides access to information about resources.

[ProviderInterface(typeof(IResourceInfoProvider))]
[Obsolete("Use CMS.DataEngine.IInfoProvider<ResourceInfo> instead. Use CMS.DataEngine.InfoProviderExtensions for additional methods for individual objects retrieval. To get an instance of the interface's implementation use dependency injection or access the instance directly via the CMS.DataEngine.Provider<ResourceInfo>.Instance property. When faking metadata in CMS.Tests.UnitTests using Fake() use the obsolete provider class until fully removed.")]
[ObsoleteSince(30, 0)]
public class ResourceInfoProvider : AbstractInfoProvider<ResourceInfo, ResourceInfoProvider>, IInfoProvider, ICustomizableProvider, IBulkOperationProvider, IWebFarmProvider, IInfoValidator<ResourceInfo>, IInfoByGuidProvider<ResourceInfo>, IBulkInfoProvider<ResourceInfo>, IResourceInfoProvider, IInfoProvider<ResourceInfo>, IInfoByIdProvider<ResourceInfo>, IInfoByNameProvider<ResourceInfo>
Inheritance
object
ResourceInfoProvider
Implements
Inherited Members
Extension Methods

Constructors

ResourceInfoProvider()

Constructor.

public ResourceInfoProvider()

Methods

IsResourceAvailable(int)

Returns a value indicating whether the specified resource (module) is available.

[Obsolete("Method is no longer used by the system and will be removed.")]
[ObsoleteSince(29, 7)]
public static bool IsResourceAvailable(int resourceId)

Parameters

resourceId int

A resource (module) identifier.

Returns

bool

True, if the specified resource exists; otherwise, false.

Remarks

A resource is available only if a database record exists and a module with the same is installed. A resource is also available if a negative identifier value is specified.

IsSystemResource(string)

Returns true if resource(specified by resource name) is considered as system

[Obsolete("Use ResourceInfoUtils.IsSystemName(string) instead.")]
[ObsoleteSince(29, 7)]
public static bool IsSystemResource(string resourceName)

Parameters

resourceName string

Resource code name

Returns

bool