public PermissionEnum Permissions = PermissionEnum.None; // set of assigned permissions /// <summary> /// Get the external group or user name corresponding to an internal name /// </summary> /// <returns></returns> public string GetExternalName() { string name = AssignedTo; if (IsGroup) { UserGroup g = UserGroups.LookupInternalName(name); if (g != null) { name = g.ExternalName; } } else // user name { DictionaryMx userDict = DictionaryMx.Get("UserName"); if (userDict != null && userDict.LookupDefinition(name) != null) { string userInfoString = userDict.LookupDefinition(name); UserInfo ui = UserInfo.Deserialize(userInfoString); name = ui.FullNameReversed; } } return(name); }
/// <summary> /// Lookup the definition for a word /// </summary> /// <param name="dictName"></param> /// <param name="word"></param> /// <returns></returns> public static string LookupDefinition( string dictName, string word) { DictionaryMx d = DictionaryMx.Get(dictName); if (d == null) { return(null); } return(d.LookupDefinition(word)); }
/// <summary> /// Deserialize dictionary /// </summary> /// <param name="serializedVersion"></param> /// <param name="dex"></param> public static void Deserialize(string serializedVersion, DictionaryMx dex) { dex.Initialize(); DictionaryMx dex2 = Deserialize(serializedVersion); foreach (string word in dex2.Words) { dex.Add(word, dex2.LookupDefinition(word)); } return; }