If you want to find an SDK sample that uses a particular feature of the Universal Windows Platform, you can try my Windows Universal Samples API concordance on http://oldnewthing.github.io/Windows-universal-samples/. Expand the tree view to find the thing you’re interested in, and it will provide links to every line of C# code that uses it.
The following deep links are also supported:
- Link to a namespace: http://oldnewthing.github.io/Windows-universal-samples/?Windows.Devices.Geolocation
- Link to a class, structure, or enumeration: http://oldnewthing.github.io/Windows-universal-samples/?Windows.Globalization.Calendar
- Link to a property or event or enumerated value: http://oldnewthing.github.io/Windows-universal-samples/?Windows.Graphics.Display.DisplayInformation.AutoRotationPreferences
- Linking to a method is a little trickier, because you need to append a backquote, then the number of parameters. This is used to disambiguate overloaded methods. http://oldnewthing.github.io/Windows-universal-samples/?Windows.Storage.StorageFile.GetThumbnailAsync`2
- Linking to a constructor is the same as linking to a method, except that you use the special method name
:ctor
. http://oldnewthing.github.io/Windows-universal-samples/?Windows.UI.Notifications.BadgeNotification.:ctor`1
I will try to keep this site in sync with the latest release of the Windows Universal Samples repo. The site is kind of ugly right now, but it works just barely well enough to do what I needed.
Note that the concordance is not complete. There are holes in the analysis which I hope to fill in over time. But at least it’s a decent start.
Eventually, I’ll blog about the program I used to generate this information. The short answer is Roslyn. That’s why it searches only in C# samples.
0 comments