public static void WrapWithValidation(this ActionCall call)
 {
     call.AddBefore(new ValidationNode(call));
 }
Ejemplo n.º 2
0
		/// <summary>
		/// 添加模块到指定路径的模块前面
		/// 如果没有找到则添加到最前面
		/// </summary>
		/// <param name="widgets">模块列表</param>
		/// <param name="beforePath">添加到这个路径的模块前面</param>
		/// <param name="path">模块路径,注意不能带后缀</param>
		/// <param name="args">模块参数</param>
		public static void AddBefore(
			this List<DiyWidget> widgets, string beforePath, string path, object args = null) {
			widgets.AddBefore(x => x.Info.WidgetPath == beforePath, new DiyWidget(path, args));
		}