예제 #1
0
 internal static long GetRandomLongId()
 {
     lock (typeof(UniqueIdGenerator))
     {
         return((long)(OdbRandom.GetRandomDouble() * long.MaxValue));
     }
 }
예제 #2
0
 private static string GetSessionId()
 {
     return
         (string.Concat("local ", OdbTime.GetCurrentTimeInTicks().ToString(),
                        OdbRandom.GetRandomInteger().ToString()));
 }
 private static int GetProfileIndex(int nbProfiles)
 {
     return(Math.Abs(OdbRandom.GetRandomInteger() * nbProfiles) % nbProfiles);
 }