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