mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
- Add Util.isUUID
- Add tests for Util.isUUID - First part of the fix for protocol interoperability between viewer 1.20 and 1.21 for friend offers.
This commit is contained in:
@@ -64,6 +64,8 @@ namespace OpenSim.Framework
|
||||
private static readonly DateTime unixEpoch =
|
||||
DateTime.ParseExact("1970-01-01 00:00:00 +0", "yyyy-MM-dd hh:mm:ss z", DateTimeFormatInfo.InvariantInfo).ToUniversalTime();
|
||||
|
||||
private static readonly Regex UUIDPattern = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
|
||||
|
||||
#region Vector Equations
|
||||
|
||||
/// <summary>
|
||||
@@ -796,5 +798,10 @@ namespace OpenSim.Framework
|
||||
x += rx;
|
||||
y += ry;
|
||||
}
|
||||
|
||||
public static bool isUUID(string s)
|
||||
{
|
||||
return UUIDPattern.IsMatch(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user