当前位置: 首页>>代码示例>>C#>>正文


C# UserAccount.FromOSD方法代码示例

本文整理汇总了C#中OpenSim.Services.Interfaces.UserAccount.FromOSD方法的典型用法代码示例。如果您正苦于以下问题:C# UserAccount.FromOSD方法的具体用法?C# UserAccount.FromOSD怎么用?C# UserAccount.FromOSD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenSim.Services.Interfaces.UserAccount的用法示例。


在下文中一共展示了UserAccount.FromOSD方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: ParseQuery

        private List<UserAccount> ParseQuery(List<UUID> scopeIDs, List<string> query)
        {
            List<UserAccount> list = new List<UserAccount>();
            for (int i = 0; i < query.Count; i += 12)
            {
                UserAccount data = new UserAccount { PrincipalID = UUID.Parse(query[i + 0]), ScopeID = UUID.Parse(query[i + 1]) };
                if(query[i + 11] != "")
                    data.FromOSD((OSDMap)OSDParser.DeserializeJson(query[i + 11]));

                //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) && (query[i + 5].Contains("=")))
                {
                    Dictionary<string, string> dict = Util.ConvertToDictionary(query[i + 5]);
                    foreach (var v in dict)
                        data.ServiceURLs[v.Key] = v.Value;
                }
                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 (string.IsNullOrEmpty(data.Name))
                {
                    data.Name = FirstName + " " + LastName;
                    //Save the change!
                    Store(data);
                }
                list.Add(data);
            }

            return AllScopeIDImpl.CheckScopeIDs(scopeIDs, list);
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:37,代码来源:LocalUserAccountConnector.cs


注:本文中的OpenSim.Services.Interfaces.UserAccount.FromOSD方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。