Util.cs 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using libsecondlife;
  5. using libsecondlife.Packets;
  6. namespace OpenSim.Framework.Utilities
  7. {
  8. public class Util
  9. {
  10. private static Random randomClass = new Random();
  11. private static uint nextXferID = 5000;
  12. private static object XferLock = new object();
  13. public static ulong UIntsToLong(uint X, uint Y)
  14. {
  15. return Helpers.UIntsToLong(X, Y);
  16. }
  17. public static Random RandomClass
  18. {
  19. get
  20. {
  21. return randomClass;
  22. }
  23. }
  24. public static uint GetNextXferID()
  25. {
  26. uint id = 0;
  27. lock(XferLock)
  28. {
  29. id = nextXferID;
  30. nextXferID++;
  31. }
  32. return id;
  33. }
  34. public Util()
  35. {
  36. }
  37. }
  38. }