本文整理汇总了C#中OpenSim.Services.Interfaces.UserAccount类的典型用法代码示例。如果您正苦于以下问题:C# UserAccount类的具体用法?C# UserAccount怎么用?C# UserAccount使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UserAccount类属于OpenSim.Services.Interfaces命名空间,在下文中一共展示了UserAccount类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get
public bool Get(UUID userID, out UserAccount account)
{
if (m_UUIDCache.TryGetValue(userID, out account))
return true;
return false;
}
示例2: RexLoginResponse
public RexLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL)
: base(account, aCircuit, pinfo, destination, invSkel, friendsList, libService, where, startlocation,
position, lookAt, gestures, message, home, clientIP, mapTileURL, searchURL)
{
}
示例3: UserAccountWithMappingData
public UserAccountWithMappingData(UserAccount accountData, UserMappingData mappingData)
{
PrincipalID = accountData.PrincipalID;
FirstName = accountData.FirstName;
LastName = accountData.LastName;
Email = accountData.Email;
ScopeID = accountData.ScopeID;
UserLevel = accountData.UserLevel;
UserFlags = accountData.UserFlags;
UserTitle = accountData.UserTitle;
ServiceURLs = accountData.ServiceURLs;
Created = accountData.Created;
if (mappingData != null)
{
RealFirstName = mappingData.RealFirstName;
RealLastName = mappingData.RealLastName;
Institution = mappingData.Institution;
ConnectID = mappingData.ConnectID;
}
else
{
RealFirstName = string.Empty;
RealLastName = string.Empty;
Institution = string.Empty;
ConnectID = string.Empty;
}
}
示例4: Login
public LoginResponse Login(Hashtable request, UserAccount account, IAgentInfo agentInfo, string authType, string password, out object data)
{
data = null;
string ip = "";
string version = "";
string platform = "";
string mac = "";
string id0 = "";
if (request != null)
{
ip = request.ContainsKey("ip") ? (string)request["ip"] : "";
version = request.ContainsKey("version") ? (string)request["version"] : "";
platform = request.ContainsKey("platform") ? (string)request["platform"] : "";
mac = request.ContainsKey("mac") ? (string)request["mac"] : "";
id0 = request.ContainsKey("id0") ? (string)request["id0"] : "";
}
string message;
if(!m_module.CheckUser(account.PrincipalID, ip,
version,
platform,
mac,
id0, out message))
{
return new LLFailedLoginResponse(LoginResponseEnum.Indeterminant, message, false);
}
return null;
}
示例5: ParseQuery
private void ParseQuery(List<string> query, ref List<UserAccount> list)
{
for (int i = 0; i < query.Count; i += 10)
{
UserAccount data = new UserAccount();
data.PrincipalID = UUID.Parse(query[i + 0]);
data.ScopeID = UUID.Parse(query[i + 1]);
data.FirstName = query[i + 2];
data.LastName = query[i + 3];
data.Email = query[i + 4];
string[] URLs = query[i + 5].Split(new char[] { ' ' });
data.ServiceURLs = new Dictionary<string, object>();
foreach (string url in URLs)
{
string[] parts = url.Split(new char[] { '=' });
if (parts.Length != 2)
continue;
string name = System.Web.HttpUtility.UrlDecode(parts[0]);
string val = System.Web.HttpUtility.UrlDecode(parts[1]);
data.ServiceURLs[name] = val;
}
data.Created = Int32.Parse(query[i + 6]);
data.UserLevel = Int32.Parse(query[i + 7]);
data.UserFlags = Int32.Parse(query[i + 8]);
data.UserTitle = query[i + 9];
list.Add(data);
}
}
示例6: TriggerInventoryArchiveSaved
/// <summary>
/// Trigger the inventory archive saved event.
/// </summary>
protected internal void TriggerInventoryArchiveSaved(
Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
Exception reportedException)
{
InventoryArchiveSaved handlerInventoryArchiveSaved = OnInventoryArchiveSaved;
if (handlerInventoryArchiveSaved != null)
handlerInventoryArchiveSaved(id, succeeded, userInfo, invPath, saveStream, reportedException);
}
示例7: InventoryArchiveReadRequest
public InventoryArchiveReadRequest(
Scene scene, UserAccount userInfo, string invPath, Stream loadStream)
{
m_scene = scene;
m_userInfo = userInfo;
m_invPath = invPath;
m_loadStream = loadStream;
}
示例8: Cache
public void Cache(UUID userID, UserAccount account)
{
// Cache even null accounts
m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d));
if (account != null)
m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d));
m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
}
示例9: InventoryArchiveReadRequest
public InventoryArchiveReadRequest(
IRegistryCore registry, UserAccount userInfo, string invPath, Stream loadStream, bool merge)
{
m_registry = registry;
m_merge = merge;
m_userInfo = userInfo;
m_invPath = invPath;
m_loadStream = loadStream;
}
示例10: InventoryArchiveReadRequest
public InventoryArchiveReadRequest(
Scene scene, UserAccount userInfo, string invPath, string loadPath)
: this(
scene,
userInfo,
invPath,
new GZipStream(new FileStream(loadPath, FileMode.Open), CompressionMode.Decompress))
{
}
示例11: Get
public bool Get(UUID userID, out UserAccount account)
{
if (m_UUIDCache.TryGetValue(userID, out account))
{
//m_log.DebugFormat("[USER CACHE]: Account {0} {1} found in cache", account.FirstName, account.LastName);
return true;
}
return false;
}
示例12: ChangeAuthentication
public static void ChangeAuthentication(OSHttpRequest request, UserAccount account)
{
if (request.Cookies["SessionID"] != null)
{
UUID sessionID = UUID.Parse(request.Cookies["SessionID"].Value);
if (_authenticatedUsers.ContainsKey(sessionID))
_authenticatedUsers[sessionID] = account;
if (_authenticatedAdminUsers.ContainsKey(sessionID))
_authenticatedAdminUsers[sessionID] = account;
}
}
示例13: Login
public LoginResponse Login(Hashtable request, UserAccount account, IAgentInfo agentInfo, string authType, string password, out object data)
{
data = null;
//
// Authenticate this user
//
if (authType == "UserAccount")
{
password = password.StartsWith("$1$") ? password.Remove(0, 3) : Util.Md5Hash(password); //remove $1$
}
string token = m_AuthenticationService.Authenticate(account.PrincipalID, authType, password, 30);
UUID secureSession = UUID.Zero;
if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession)))
return LLFailedLoginResponse.AuthenticationProblem;
data = secureSession;
return null;
}
示例14: ParseQuery
private void ParseQuery(List<string> query, ref List<UserAccount> list)
{
for (int i = 0; i < query.Count; i += 11)
{
UserAccount data = new UserAccount();
data.PrincipalID = UUID.Parse(query[i + 0]);
data.ScopeID = UUID.Parse(query[i + 1]);
//We keep these even though we don't always use them because we might need to create the "Name" from them
string FirstName = query[i + 2];
string LastName = query[i + 3];
data.Email = query[i + 4];
data.ServiceURLs = new Dictionary<string, object>();
if (query[i + 5] != null)
{
string[] URLs = query[i + 5].Split(new char[] { ' ' });
foreach (string url in URLs)
{
string[] parts = url.Split(new char[] { '=' });
if (parts.Length != 2)
continue;
string name = System.Web.HttpUtility.UrlDecode(parts[0]);
string val = System.Web.HttpUtility.UrlDecode(parts[1]);
data.ServiceURLs[name] = val;
}
}
data.Created = Int32.Parse(query[i + 6]);
data.UserLevel = Int32.Parse(query[i + 7]);
data.UserFlags = Int32.Parse(query[i + 8]);
data.UserTitle = query[i + 9];
data.Name = query[i + 10];
if (data.Name == null || data.Name == "")
{
data.Name = FirstName + " " + LastName;
//Save the change!
Store(data);
}
list.Add(data);
}
}
示例15: FromOSD
public override void FromOSD(OSDMap map)
{
AgentInfo = new IAgentInfo();
AgentInfo.FromOSD((OSDMap)(map["AgentInfo"]));
UserAccount = new UserAccount();
UserAccount.FromOSD((OSDMap)(map["UserAccount"]));
if (!map.ContainsKey("ActiveGroup"))
ActiveGroup = null;
else
{
ActiveGroup = new GroupMembershipData();
ActiveGroup.FromOSD((OSDMap)(map["ActiveGroup"]));
}
GroupMemberships = ((OSDArray)map["GroupMemberships"]).ConvertAll<GroupMembershipData>((o) =>
{
GroupMembershipData group = new GroupMembershipData();
group.FromOSD((OSDMap)o);
return group;
});
}