Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Mono
diff options
context:
space:
mode:
authorJb Evain <jbevain@gmail.com>2012-12-03 22:23:45 +0400
committerJb Evain <jbevain@gmail.com>2012-12-03 22:23:45 +0400
commitd9976f58f40fe9973a015198e1cc7d3773c4b640 (patch)
tree7ea9e57e120c42e74e4e07e18a7cfd52141c93ef /Mono
parent9bfe76be006fbf8cd2dc4df20b00764e8faecfc7 (diff)
Properly read unsorted GenericParam, DeclSecl and CustomAttr tables
Diffstat (limited to 'Mono')
-rw-r--r--Mono/Empty.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Mono/Empty.cs b/Mono/Empty.cs
index d043a35..820bc34 100644
--- a/Mono/Empty.cs
+++ b/Mono/Empty.cs
@@ -26,6 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
using Mono.Collections.Generic;
namespace Mono {
@@ -49,5 +50,18 @@ namespace Mono.Cecil {
{
return self == null || self.size == 0;
}
+
+ public static T [] Resize<T> (this T [] self, int length)
+ {
+#if !CF
+ Array.Resize (ref self, length);
+#else
+ var copy = new T [length];
+ Array.Copy (self, copy, self.Length);
+ array = copy;
+#endif
+
+ return self;
+ }
}
}