private string createHash(DataEntityHandle handle, string context) { string text = null; if (dataEntityCollection.TryGetComponent <AvatarDetailsData>(handle, out var component) && component.Outfit != null) { string displayName = dataEntityCollection.GetComponent <DisplayNameData>(handle).DisplayName; AvatarDetailsHashable data = new AvatarDetailsHashable(component, displayName, context); return(MD5HashUtil.GetHash(data)); } throw new ArgumentException("Data entity handle did not have valid avatar details"); }
/// <summary> /// 打开本地文件工作空间 /// </summary> /// <param name="conn"></param> /// <returns></returns> public virtual TWorkspace OpenWorkspace(LocalConn conn) { string md5Hash = MD5HashUtil.GetMD5Hash(JsonConvert.SerializeObject(conn)); if (TWorkspaceDic.ContainsKey(md5Hash)) { return(TWorkspaceDic[md5Hash]); } TWorkspace workspace = this._dmeWorkspace.Open(conn); TWorkspaceDic[md5Hash] = workspace; return(workspace); }
public static string Id(string userName) { return(MD5HashUtil.GetHash(userName.ToLowerInvariant())); }