vc3/Afterthought — Issue #36: Indexer properties
Author: kovapie
Created: 2012-02-01 19:01:27+00:00
State: open

Hi,

I'd like to create an Amendment for IDataErrorInfo.
What is the correct syntax to add an indexer?

The following will not work:
Properties.Add("this[string columnName]" ?
Properties.Add("Item[string columnName]" ?

Unless it should be a Method?
Methods.Add ?

Below the example of the amendment class:

public class DataErrorInfoAmendment : Amendment where T : class
{
public DataErrorInfoAmendment()
{
Implement(
Properties.Add("Error", (instance, name) => null),
Properties.Add("this[string columnName]", DataErrorInfoAmender.ValidateProperty)
);
}
}

Many thanks for your help in advance

Pierre