public void Visit(DotClient methodInvocation)
 {
     _sb.Append(methodInvocation.ClientId.Name + ".");
     methodInvocation.TunMethodCall.Accept(this);
 }
        public void Visit(DotClient dotClient)
        {
            if (!_env.IsVisitingServer())
                throw new TypeCheckingException("can't access a client '" + dotClient.ClientId + "' from a client '" + _env.VisitPartEnv.PartName + "'.");
            var x = _env.VisitPartEnv.Functions[_env.VisitFunName].IdToClient[dotClient.ClientId.Name];
            foreach (var c in _env.Clients)
            {
                if (c.PartName == x.PartName)
                {
                    PartEnv tmp = _env.VisitPartEnv;
                    _env.VisitPartEnv = c;
                    _env.FakeEnvForTunnel = true;
                    dotClient.TunMethodCall.Accept(this);
                    _env.VisitPartEnv = tmp;
                    _env.FakeEnvForTunnel = false;
                    dotClient.SmclType = dotClient.TunMethodCall.TunMethod.SmclType;
                    return;
                }

            }
            throw new TypeCheckingException("can't use a dot operator on a non-client '" + dotClient.ClientId.Name + "'");
        }