forked from nanoframework/Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtendedWeakReference.cs
33 lines (30 loc) · 922 Bytes
/
ExtendedWeakReference.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
namespace Tetris
{
public class ExtendedWeakReference
{
public enum PriorityLevel : int
{
OkayToThrowAway = 1000,
NiceToHave = 500000,
Important = 750000,
Critical = 1000000,
System = 10000000,
}
public static uint c_SurvivePowerdown {get;set;}
public uint Id { get; set; }
public uint Flags { get; set; }
public Type Selector { get; set; }
public int Priority { get; set; }
public object Target { get; set; }
public static ExtendedWeakReference RecoverOrCreate(Type selector, uint id, uint flags)
{
ExtendedWeakReference wr = Recover(selector, id);
return wr;
}
public static ExtendedWeakReference Recover(Type selector, uint id)
{
return new ExtendedWeakReference();
}
}
}