mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
fission UserAccountService.HandleCreateUser() into two methods, one which handles user command parsing and another which actually does the work
This commit is contained in:
@@ -36,85 +36,82 @@ namespace OpenSim.Tests.Common.Setup
|
||||
/// </summary>
|
||||
public static class UserProfileTestUtils
|
||||
{
|
||||
// REFACTORING PROBLEM
|
||||
// This needs to be rewritten
|
||||
|
||||
///// <summary>
|
||||
///// Create a test user with a standard inventory
|
||||
///// </summary>
|
||||
///// <param name="commsManager"></param>
|
||||
///// <param name="callback">
|
||||
///// Callback to invoke when inventory has been loaded. This is required because
|
||||
///// loading may be asynchronous, even on standalone
|
||||
///// </param>
|
||||
///// <returns></returns>
|
||||
//public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, OnInventoryReceivedDelegate callback)
|
||||
//{
|
||||
// UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
|
||||
// return CreateUserWithInventory(commsManager, userId, callback);
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// Create a test user with a standard inventory
|
||||
///// </summary>
|
||||
///// <param name="commsManager"></param>
|
||||
///// <param name="userId">User ID</param>
|
||||
///// <param name="callback">
|
||||
///// Callback to invoke when inventory has been loaded. This is required because
|
||||
///// loading may be asynchronous, even on standalone
|
||||
///// </param>
|
||||
///// <returns></returns>
|
||||
//public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback)
|
||||
//{
|
||||
// return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback);
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// Create a test user with a standard inventory
|
||||
///// </summary>
|
||||
///// <param name="commsManager"></param>
|
||||
///// <param name="firstName">First name of user</param>
|
||||
///// <param name="lastName">Last name of user</param>
|
||||
///// <param name="userId">User ID</param>
|
||||
///// <param name="callback">
|
||||
///// Callback to invoke when inventory has been loaded. This is required because
|
||||
///// loading may be asynchronous, even on standalone
|
||||
///// </param>
|
||||
///// <returns></returns>
|
||||
//public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, string firstName, string lastName,
|
||||
// UUID userId, OnInventoryReceivedDelegate callback)
|
||||
//{
|
||||
// return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// Create a test user with a standard inventory
|
||||
///// </summary>
|
||||
///// <param name="commsManager"></param>
|
||||
///// <param name="firstName">First name of user</param>
|
||||
///// <param name="lastName">Last name of user</param>
|
||||
///// <param name="password">Password</param>
|
||||
///// <param name="userId">User ID</param>
|
||||
///// <param name="callback">
|
||||
///// Callback to invoke when inventory has been loaded. This is required because
|
||||
///// loading may be asynchronous, even on standalone
|
||||
///// </param>
|
||||
///// <returns></returns>
|
||||
//public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, string firstName, string lastName, string password,
|
||||
// UUID userId, OnInventoryReceivedDelegate callback)
|
||||
//{
|
||||
// LocalUserServices lus = (LocalUserServices)commsManager.UserService;
|
||||
// lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
|
||||
|
||||
// CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
|
||||
// userInfo.OnInventoryReceived += callback;
|
||||
// userInfo.FetchInventory();
|
||||
|
||||
// return userInfo;
|
||||
//}
|
||||
// /// <summary>
|
||||
// /// Create a test user with a standard inventory
|
||||
// /// </summary>
|
||||
// /// <param name="commsManager"></param>
|
||||
// /// <param name="callback">
|
||||
// /// Callback to invoke when inventory has been loaded. This is required because
|
||||
// /// loading may be asynchronous, even on standalone
|
||||
// /// </param>
|
||||
// /// <returns></returns>
|
||||
// public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, OnInventoryReceivedDelegate callback)
|
||||
// {
|
||||
// UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
|
||||
// return CreateUserWithInventory(commsManager, userId, callback);
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Create a test user with a standard inventory
|
||||
// /// </summary>
|
||||
// /// <param name="commsManager"></param>
|
||||
// /// <param name="userId">User ID</param>
|
||||
// /// <param name="callback">
|
||||
// /// Callback to invoke when inventory has been loaded. This is required because
|
||||
// /// loading may be asynchronous, even on standalone
|
||||
// /// </param>
|
||||
// /// <returns></returns>
|
||||
// public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback)
|
||||
// {
|
||||
// return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback);
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Create a test user with a standard inventory
|
||||
// /// </summary>
|
||||
// /// <param name="commsManager"></param>
|
||||
// /// <param name="firstName">First name of user</param>
|
||||
// /// <param name="lastName">Last name of user</param>
|
||||
// /// <param name="userId">User ID</param>
|
||||
// /// <param name="callback">
|
||||
// /// Callback to invoke when inventory has been loaded. This is required because
|
||||
// /// loading may be asynchronous, even on standalone
|
||||
// /// </param>
|
||||
// /// <returns></returns>
|
||||
// public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, string firstName, string lastName,
|
||||
// UUID userId, OnInventoryReceivedDelegate callback)
|
||||
// {
|
||||
// return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Create a test user with a standard inventory
|
||||
// /// </summary>
|
||||
// /// <param name="commsManager"></param>
|
||||
// /// <param name="firstName">First name of user</param>
|
||||
// /// <param name="lastName">Last name of user</param>
|
||||
// /// <param name="password">Password</param>
|
||||
// /// <param name="userId">User ID</param>
|
||||
// /// <param name="callback">
|
||||
// /// Callback to invoke when inventory has been loaded. This is required because
|
||||
// /// loading may be asynchronous, even on standalone
|
||||
// /// </param>
|
||||
// /// <returns></returns>
|
||||
// public static CachedUserInfo CreateUserWithInventory(
|
||||
// CommunicationsManager commsManager, string firstName, string lastName, string password,
|
||||
// UUID userId, OnInventoryReceivedDelegate callback)
|
||||
// {
|
||||
// LocalUserServices lus = (LocalUserServices)commsManager.UserService;
|
||||
// lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
|
||||
//
|
||||
// CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
|
||||
// userInfo.OnInventoryReceived += callback;
|
||||
// userInfo.FetchInventory();
|
||||
//
|
||||
// return userInfo;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user