private string Rewrite(Match m) { string var = m.Groups["var"].Value; string name = m.Groups["name"].Value; ReflectionResolverEventArgs args = new ReflectionResolverEventArgs( var, name); if (OnRewrite != null) { OnRewrite(this, args); } if (!args.Rewritten) { throw new Exception(string.Format("Unsupported variable or missing handler: @({0}.{1})", var, name)); } return args.Result; }
private string Rewrite(Match m) { string var = m.Groups["var"].Value; string name = m.Groups["name"].Value; ReflectionResolverEventArgs args = new ReflectionResolverEventArgs( var, name); if (OnRewrite != null) { OnRewrite(this, args); } if (!args.Rewritten) { throw new Exception(string.Format("Unsupported variable or missing handler: @({0}.{1})", var, name)); } return(args.Result); }