DataAttribute class

Namespace: CodeEffects.Rule.Attributes
Assembly: CodeEffects.Rule.dll

Defines a single reusable Dynamic Menu Data Source on a source object level.

Syntax

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class DataAttribute : Attribute

Properties

  • Assembly Type: System.String

    Gets or sets the qualified name of the assembly of the class that declares the data source method. For server-side methods, this and the TypeName properties are required if Type property is not set. You can get this name by executing Assembly.GetAssembly( declaringClassType ).FullName.

  • Method Type: System.String

    Gets or sets the name of the method that provides the menu data source. On the server, this should be a public parameterless method that returns ICollection<DataSourceItem>. On the client, the function is expected to be parameterless and returns an array of anonymous objects of the following notation: { ID: "Item string ID", Name: "Item string name" }.

  • Name Type: System.String

    Gets or sets the unique name of the data source that can be used to distinguish this source from all other data sources within the same source object. Think of this property as a data source ID that is unique only for the current source object. The uniqueness of each name should be verified by the developer; Code Effects component does not enforce it.

  • Type Type: System.Type

    Gets or sets the type of the class that declares the data source method. For server-side methods, this property is required if the Assembly and TypeName properties are not set.

  • TypeName Type: System.String

    Gets or sets the full type name of the class that declares the data source method. For server-side methods, this and the Assembly properties are required if the Type property is not set. You can get this name by executing typeof(ClassName).FullName.

IMPORTANT! Code Effects component can use any qualified .NET methods or any accessible client-side functions as a menu data source. If a constructor that doesn't take any type references is used, Code Effects will assume that the data source is a client function.

The Dynamic Menu Data Sources is an important feature of Code Effects. Details on the use of the DataAttribute as well as details on the feature itself are provided in the feature topic.

This attribute is optional.

Post your support requests on Stackoverflow.com. You can also post your comments and product feedback using the form at the bottom of this page.
Comments: 0
Name (optional):
Comment (URLs are allowed and must start with http:// or https://; all tags will be encoded):
Remaining character count: