OpenMetaverse.FriendsManager.Avatars_OnAvatarNames C# (CSharp) Метод

Avatars_OnAvatarNames() приватный Метод

This handles the asynchronous response of a RequestAvatarNames call.
private Avatars_OnAvatarNames ( string>.Dictionary names ) : void
names string>.Dictionary names cooresponding to the the list of IDs sent the the RequestAvatarNames call.
Результат void
        private void Avatars_OnAvatarNames(Dictionary<UUID, string> names)
        {
            lock (FriendList)
            {
                Dictionary<UUID, string> newNames = new Dictionary<UUID, string>();
                foreach (KeyValuePair<UUID, string> kvp in names)
                {
                    if (FriendList.ContainsKey(kvp.Key))
                    {
                        if (FriendList[kvp.Key].Name == null)
                            newNames.Add(kvp.Key, names[kvp.Key]);

                        FriendList[kvp.Key].Name = names[kvp.Key];
                    }
                }
                if (newNames.Count > 0 && OnFriendNamesReceived != null)
                {
                    try { OnFriendNamesReceived(newNames); }
                    catch (Exception e) { Logger.Log(e.Message, Helpers.LogLevel.Error, Client, e); }
                }
            }
        }