Exemple #1
0
    private static void Setup()
    {
        Instance = new ReferenceFinderTestCase();

        var o = new Unit {
            name = "fads",
        };

        Instance.mUnit = o;
        Instance.mList = new List <Unit> {
            o, o
        };
        Instance.mObj          = new { fieldZ = o };
        Instance.mHashtable    = new Hashtable();
        Instance.mHashtable[o] = o;
        Instance.mObjDict      = new Dictionary <object, object> {
            { o, o }
        };
        Instance.mObjTypedDict = new Dictionary <Unit, string> {
            { o, "fadfs" }
        };
        Instance.mArray = new Unit[] { o, o, o };

        Instance.mAction = () =>
        {
            Console.WriteLine(o);
        };
        Instance.mStrFunc = o.ToString;

        Instance.mObjArray = new object[] { o, new object[][] { new object[] { o, new List <object> {
                                                                                   o
                                                                               } }, new object[] { (Func <Type>)o.GetType, (Func <int>)o.GetHashCode } }, CreateEnumerable(o), CreateEnumerator(o) };
    }
    private static void Setup()
    {
        Instance = new ReferenceFinderTestCase();

        var o = new Unit { name = "fads", };

        Instance.mUnit = o;
        Instance.mList = new List<Unit> { o, o };
        Instance.mObj = new { fieldZ = o };
        Instance.mHashtable = new Hashtable();
        Instance.mHashtable[o] = o;
        Instance.mObjDict = new Dictionary<object, object> { { o, o } };
        Instance.mObjTypedDict = new Dictionary<Unit, string> { { o, "fadfs" } };
        Instance.mArray = new Unit[] { o, o, o };

        Instance.mAction = () =>
        {
            Console.WriteLine(o);
        };
        Instance.mStrFunc = o.ToString;

        Instance.mObjArray = new object[] { o, new object[][] { new object[] { o, new List<object> { o } }, new object[] { (Func<Type>)o.GetType, (Func<int>)o.GetHashCode } }, CreateEnumerable(o), CreateEnumerator(o) };
    }
 private static void Cleanup()
 {
     Instance = null;
 }
Exemple #4
0
 private static void Cleanup()
 {
     Instance = null;
 }