GetDataSourceDelegate Delegate
Assembly: CodeEffects.Rule.Editor.dll
Namespace: CodeEffects.Rule.Editor.Models
Summary
Declares the signature of a parameterless method that returns a collection of DataSourceItem instances used by the Dynamic Menu Data Source feature.
Syntax
public delegate ICollection<DataSourceItem> GetDataSourceDelegate();
Parameters
Returns
Type: System.Collections.Generic.ICollection<CodeEffects.Rule.Editor.Client.DataSourceItem>
The items of the data source.
Example
public static ICollection<DataSourceItem> GetSchools()
{
return new List<DataSourceItem>
{
new DataSourceItem(1, "School # 1"),
new DataSourceItem(2, "School # 2")
};
}
// Wrap the method in a delegate and give it the name the source object uses
var holder = new DataSourceHolder { Name = "Education", Delegate = GetSchools };