Adding extension methods to PartialViewMacroModel to allow: Model.GetParameterValue<DateTime>("datey")

Model.GetParameterValue<int>("booly", 8) //optional default value if parsing can't happen
Model.GetParameterValue("booly",8) // can be used like this as type is implied by default value argument
This commit is contained in:
Darren Ferguson
2014-05-14 11:33:40 +01:00
parent 5abbca0f5d
commit a2a81222e6
2 changed files with 2 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ namespace Umbraco.Web.Models
return attempt.Success ? (T) attempt.Result : defaultValue;
}
/// <summary>
/// <summary>
/// Attempt to get a Marco parameter from a PartialViewMacroModel
/// </summary>
/// <param name="partialViewMacroModel"></param>