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

  • None.

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 };

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×