當前位置: 首頁>>代碼示例>>C#>>正文


C# Interfaces.UserAccount類代碼示例

本文整理匯總了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;
        }
開發者ID:NickyPerian,項目名稱:Aurora-Sim,代碼行數:7,代碼來源:UserAccountCache.cs

示例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)
 {
 }
開發者ID:jonnenauha,項目名稱:ModreX,代碼行數:8,代碼來源:RexLoginResponse.cs

示例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;
            }
        }
開發者ID:cecil-uoa,項目名稱:diva-distribution-uoa-mods,代碼行數:29,代碼來源:IUserMappingData.cs

示例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;
        }
開發者ID:samiam123,項目名稱:Aurora-Sim,代碼行數:30,代碼來源:BanCheck.cs

示例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);
            }
        }
開發者ID:mugginsm,項目名稱:Aurora-Sim,代碼行數:34,代碼來源:LocalUserAccountConnector.cs

示例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);
 }
開發者ID:kchi059,項目名稱:Aurora-Sim,代碼行數:11,代碼來源:InventoryArchiverModule.cs

示例7: InventoryArchiveReadRequest

 public InventoryArchiveReadRequest(
     Scene scene, UserAccount userInfo, string invPath, Stream loadStream)
 {
     m_scene = scene;
     m_userInfo = userInfo;
     m_invPath = invPath;
     m_loadStream = loadStream;
 }
開發者ID:AlexRa,項目名稱:opensim-mods-Alex,代碼行數:8,代碼來源:InventoryArchiveReadRequest.cs

示例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);
        }
開發者ID:AlexRa,項目名稱:opensim-mods-Alex,代碼行數:9,代碼來源:UserAccountCache.cs

示例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;
 }
開發者ID:savino1976,項目名稱:Aurora-Sim,代碼行數:9,代碼來源:InventoryArchiveReadRequest.cs

示例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))
 {
 }
開發者ID:gumho,項目名稱:diva-distribution,代碼行數:9,代碼來源:InventoryArchiveReadRequest.cs

示例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;
        }
開發者ID:rknop,項目名稱:Aurora-Sim,代碼行數:10,代碼來源:UserAccountCache.cs

示例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;
     }
 }
開發者ID:rjspence,項目名稱:YourSim,代碼行數:11,代碼來源:Authenticator.cs

示例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;
 }
開發者ID:nathanmarck,項目名稱:Aurora-Sim,代碼行數:17,代碼來源:PasswordLoginModule.cs

示例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);
            }
        }
開發者ID:kow,項目名稱:Aurora-Sim,代碼行數:45,代碼來源:LocalUserAccountConnector.cs

示例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;
         });
 }
開發者ID:Gnu32,項目名稱:Silverfin,代碼行數:20,代碼來源:ISimulationService.cs


注:本文中的OpenSim.Services.Interfaces.UserAccount類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。