Skip to content

Instantly share code, notes, and snippets.

@einarwh
Created June 20, 2012 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save einarwh/2960299 to your computer and use it in GitHub Desktop.
Save einarwh/2960299 to your computer and use it in GitHub Desktop.
Changing TryInvokeMember to allow for nested tags
public override bool TryInvokeMember(
InvokeMemberBinder binder,
object[] args,
out object result)
{
string arg = GetValue(args);
string methodName = binder.Name;
if (methodName == "Tag" && arg != null)
{
result = ToString().Tag(arg);
}
else
{
_props[methodName] = arg ?? string.Empty;
result = this;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment