private IList<XslNode> AddRemoveImplicitArgs(IList<XslNode> args, XslFlags flags)
{
//We currently don't reuse the same argument list. So remove is not needed and will not work in this code
if (IsDebug)
{
flags = XslFlags.FullFocus;
}
if ((flags & XslFlags.FocusFilter) != 0)
{
if (args == null || args.IsReadOnly)
{
args = new List<XslNode>(3);
}
int pos = 0;
if ((flags & XslFlags.Current) != 0) { SetArg(args, pos++, _nameCurrent, GetCurrentNode()); }
if ((flags & XslFlags.Position) != 0) { SetArg(args, pos++, _namePosition, GetCurrentPosition()); }
if ((flags & XslFlags.Last) != 0) { SetArg(args, pos++, _nameLast, GetLastPosition()); }
}
return args;
}