本文整理汇总了C#中OpenSim.Services.Connectors.Hypergrid.UserAgentServiceConnector.LogoutAgent方法的典型用法代码示例。如果您正苦于以下问题:C# UserAgentServiceConnector.LogoutAgent方法的具体用法?C# UserAgentServiceConnector.LogoutAgent怎么用?C# UserAgentServiceConnector.LogoutAgent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Services.Connectors.Hypergrid.UserAgentServiceConnector
的用法示例。
在下文中一共展示了UserAgentServiceConnector.LogoutAgent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnConnectionClosed
void OnConnectionClosed(IClientAPI obj)
{
if (obj.IsLoggingOut)
{
object sp = null;
if (obj.Scene.TryGetScenePresence(obj.AgentId, out sp))
{
if (((ScenePresence)sp).IsChildAgent)
return;
}
// Let's find out if this is a foreign user or a local user
UserAccount account = m_aScene.UserAccountService.GetUserAccount(m_aScene.RegionInfo.ScopeID, obj.AgentId);
if (account != null)
{
// local grid user
return;
}
AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode);
if (aCircuit.ServiceURLs.ContainsKey("HomeURI"))
{
string url = aCircuit.ServiceURLs["HomeURI"].ToString();
IUserAgentService security = new UserAgentServiceConnector(url);
security.LogoutAgent(obj.AgentId, obj.SessionId);
//m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Sent logout call to UserAgentService @ {0}", url);
}
else
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: HomeURI not found for agent {0} logout", obj.AgentId);
}
}
示例2: OnConnectionClosed
void OnConnectionClosed(IClientAPI obj)
{
if (obj.SceneAgent.IsChildAgent)
return;
// Let's find out if this is a foreign user or a local user
IUserManagement uMan = Scene.RequestModuleInterface<IUserManagement>();
// UserAccount account = Scene.UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, obj.AgentId);
if (uMan != null && uMan.IsLocalGridUser(obj.AgentId))
{
// local grid user
m_UAS.LogoutAgent(obj.AgentId, obj.SessionId);
return;
}
AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode);
if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("HomeURI"))
{
string url = aCircuit.ServiceURLs["HomeURI"].ToString();
IUserAgentService security = new UserAgentServiceConnector(url);
security.LogoutAgent(obj.AgentId, obj.SessionId);
//m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Sent logout call to UserAgentService @ {0}", url);
}
else
{
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: HomeURI not found for agent {0} logout", obj.AgentId);
}
}
示例3: OnConnectionClosed
void OnConnectionClosed(IClientAPI obj)
{
if (obj.IsLoggingOut)
{
AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode);
if (aCircuit.ServiceURLs.ContainsKey("HomeURI"))
{
string url = aCircuit.ServiceURLs["HomeURI"].ToString();
IUserAgentService security = new UserAgentServiceConnector(url);
security.LogoutAgent(obj.AgentId, obj.SessionId);
//m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Sent logout call to UserAgentService @ {0}", url);
}
else
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: HomeURI not found for agent {0} logout", obj.AgentId);
}
}