In a previous post I mentioned I had built an .NET 1.1 implementation of the assembly resources, as they will appear in the Whidbey framework, for the Van Loon company. It seems only fair that I put the code up (see below), to show the actual implementation.
There are three major pieces missing from the Whidbey version:
- No substitution of resource references in a resource is implemented
- Caching:
Only clientside caching is implemented. - Timestamp:
There is no timestamp taken from the assembly. This means that the (non-present) server-side cache doesn’t get cleared if the requested timestamp is different from the current one.
Anyway, take it as a starting point for your own implementation. I took the “Serving images as from .NET assemblies“ article on MSDN as one.
As always, I am open to suggestions regarding this piece of code.
WebResources.zip (2.68 KB)