/// <summary> /// Return a new data path, that not exist yet. /// </summary> private static string GetNewPath() { string possiblePath = MyRandom.GetRandomString(8, CharType.Alphabetic); while (dataDict.Contains(possiblePath)) { possiblePath = MyRandom.GetRandomString(8, CharType.Alphabetic); } return(DATA_PATH + possiblePath + EXTENSION); }
/// <summary> /// Return a new data key, that not exist yet. /// </summary> private static string GetNewKey() { string possibleKey = MyRandom.GetRandomString(4, CharType.Alphabetic); while (dataDict.ContainsKey(possibleKey)) { possibleKey = MyRandom.GetRandomString(4, CharType.Alphabetic); } return(possibleKey); }