PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/BlogEngine/DotNetSlave.BusinessLogic/Compilation/Design/QueryStringExpressionEditor.cs

#
C# | 45 lines | 15 code | 4 blank | 26 comment | 0 complexity | df2b3421cad72a8500e75e3d4b4be6c2 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. // --------------------------------------------------------------------------------------------------------------------
  2. // <summary>
  3. // Query String Expression Editor
  4. // </summary>
  5. // --------------------------------------------------------------------------------------------------------------------
  6. namespace BlogEngine.Core.Compilation.Design
  7. {
  8. using System;
  9. using System.Web.UI.Design;
  10. /// <summary>
  11. /// Query String Expression Editor
  12. /// </summary>
  13. public class QueryStringExpressionEditor : ExpressionEditor
  14. {
  15. #region Public Methods
  16. /// <summary>
  17. /// Evaluates an expression string and provides the design-time value for a control property.
  18. /// </summary>
  19. /// <param name="expression">
  20. /// An expression string to evaluate. The expression does not include the expression prefix.
  21. /// </param>
  22. /// <param name="parseTimeData">
  23. /// An object containing additional parsing information for evaluating <paramref name="expression"/>. This typically is provided by the expression builder.
  24. /// </param>
  25. /// <param name="propertyType">
  26. /// The type of the control property to which <paramref name="expression"/> is bound.
  27. /// </param>
  28. /// <param name="serviceProvider">
  29. /// A service provider implementation supplied by the designer host, used to obtain additional design-time services.
  30. /// </param>
  31. /// <returns>
  32. /// The object referenced by the evaluated expression string, if the expression evaluation succeeded; otherwise, null.
  33. /// </returns>
  34. public override object EvaluateExpression(
  35. string expression, object parseTimeData, Type propertyType, IServiceProvider serviceProvider)
  36. {
  37. return string.Concat("[QueryString:", expression, "]");
  38. }
  39. #endregion
  40. }
  41. }