shanselman / SmallestDotNet

SmallestDotNet - SmallestDotNet.com is a single page site that does one thing. It tells you the smallest, easiest download you'd need to get the .NET Framework on your system.
MIT License
130 stars 64 forks source link

Helper refactoring #12

Closed KjWhal closed 11 years ago

KjWhal commented 12 years ago

I created an interface IRequestAnalyzer so that the code for generating the info string could be parceled out into different classes implementing the interface (per OS / CLR Version / Browser etc).

This commit includes the interface, implementations (at least, as of before Michael's updates) and an app which is intended to replace helper itself. It's constructor will take an IEnumerable of the IRequestAnalyzers so that new implementations can be 'plugged' in on an as-needed basis. There's a unit test to show how this would work.

As for changes to existing code. I tweaked the names of the constants to make a little more sense on reading. Hope this works!

KjWhal commented 12 years ago

I have a new commit which is compatible with the userAgent/version scheme.

KjWhal commented 12 years ago

This seems to be languishing and the helper class is just growing. If there's a clarification of how this works that's needed I can provide, otherwise it can be closed and I'll move on.

msarchet commented 11 years ago

Moved away from this