Software resource allocator in C#