removed Ijw.DirectX, Ijw.Framework deps

This commit is contained in:
Chris Forbes
2010-02-16 18:52:26 +13:00
parent 95ae493dc4
commit 4258e78049
38 changed files with 250 additions and 54 deletions

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenRa.FileFormats
{
public class Lazy<T>
{
Func<T> p;
T value;
public Lazy(Func<T> p)
{
if (p == null)
throw new ArgumentNullException();
this.p = p;
}
public T Value
{
get
{
if (p == null)
return value;
value = p();
p = null;
return value;
}
}
}
public static class Lazy
{
public static Lazy<T> New<T>(Func<T> p) { return new Lazy<T>(p); }
}
}