Scenario: User is deriving from ODataActionParameters to create strongly typed properties whose data is backed by the deserialized dictionary of key-values.
Currently ODataActionParameters derives from Dictionary<string,object> and i create a custom type deriving from it ODataActionParameters and provide strongly typed properties so that users can access these at the action.
But since ODataActionParameters derives from Dictionary<string,object>, the intellisense shows up all the applicable stuff of the Dictionary too...can we instead have a property on ODataActionParameters which has the deserialized key-values..something like "ParameterValues"?
Example:
[ODataParameterBinding]
public class ExtendSupportDateParams : ODataActionParameters
{
public DateTime? NewDate
{
get
{
if (this.ParameterValues.ContainsKey("newDate"))
{
return Convert.ToDateTime(this.ParameterValues["newDate"]);
}
return null;
}
}
}
Currently ODataActionParameters derives from Dictionary<string,object> and i create a custom type deriving from it ODataActionParameters and provide strongly typed properties so that users can access these at the action.
But since ODataActionParameters derives from Dictionary<string,object>, the intellisense shows up all the applicable stuff of the Dictionary too...can we instead have a property on ODataActionParameters which has the deserialized key-values..something like "ParameterValues"?
Example:
[ODataParameterBinding]
public class ExtendSupportDateParams : ODataActionParameters
{
public DateTime? NewDate
{
get
{
if (this.ParameterValues.ContainsKey("newDate"))
{
return Convert.ToDateTime(this.ParameterValues["newDate"]);
}
return null;
}
}
}