diff options
author | Diva Canto | 2013-02-28 14:20:31 -0800 |
---|---|---|
committer | Diva Canto | 2013-02-28 14:20:31 -0800 |
commit | 433102108b903669cef632feff871fe9bc37021c (patch) | |
tree | d530ec4b8164d569a8064b0beaef37cde2f279ae /OpenSim/Tests/Common/TestHelpers.cs | |
parent | Bug fix in DataSnapshot, where a var was being used before being initialized. (diff) | |
parent | Fix potential concurrency issue since the LSL notecard cache was not being ch... (diff) | |
download | opensim-SC-433102108b903669cef632feff871fe9bc37021c.zip opensim-SC-433102108b903669cef632feff871fe9bc37021c.tar.gz opensim-SC-433102108b903669cef632feff871fe9bc37021c.tar.bz2 opensim-SC-433102108b903669cef632feff871fe9bc37021c.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Tests/Common/TestHelpers.cs')
-rw-r--r-- | OpenSim/Tests/Common/TestHelpers.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Tests/Common/TestHelpers.cs b/OpenSim/Tests/Common/TestHelpers.cs index 57da802..a684d72 100644 --- a/OpenSim/Tests/Common/TestHelpers.cs +++ b/OpenSim/Tests/Common/TestHelpers.cs | |||
@@ -114,6 +114,27 @@ namespace OpenSim.Tests.Common | |||
114 | } | 114 | } |
115 | 115 | ||
116 | /// <summary> | 116 | /// <summary> |
117 | /// Parse a UUID stem into a full UUID. | ||
118 | /// </summary> | ||
119 | /// <remarks> | ||
120 | /// Yes, this is completely inconsistent with ParseTail but this is probably a better way to do it, | ||
121 | /// UUIDs are conceptually not hexadecmial numbers. | ||
122 | /// The fragment will come at the start of the UUID. The rest will be 0s | ||
123 | /// </remarks> | ||
124 | /// <returns></returns> | ||
125 | /// <param name='frag'> | ||
126 | /// A UUID fragment that will be parsed into a full UUID. Therefore, it can only contain | ||
127 | /// cahracters which are valid in a UUID, except for "-" which is currently only allowed if a full UUID is | ||
128 | /// given as the 'fragment'. | ||
129 | /// </param> | ||
130 | public static UUID ParseStem(string stem) | ||
131 | { | ||
132 | string rawUuid = stem.PadRight(32, '0'); | ||
133 | |||
134 | return UUID.Parse(rawUuid); | ||
135 | } | ||
136 | |||
137 | /// <summary> | ||
117 | /// Parse tail section into full UUID. | 138 | /// Parse tail section into full UUID. |
118 | /// </summary> | 139 | /// </summary> |
119 | /// <param name="tail"></param> | 140 | /// <param name="tail"></param> |