Metadata Store Programmability
The metadata store is a Windows Workflow Designer feature that allows for the association of arbitrary metadata, in the form of CLR attributes, to types at runtime. This allows for a loose coupling between the run-time components and their design-time counterparts, as well as the ability to change the design-time components without affecting the runtime. The sample shows how to program against the metadata store by applying attributes to a run-time type, the source for which we have no control over. The terminology typically used is that a hosting application registers the metadata for a set of types.
Within the output, you may notice an additional, unexpected attribute, GUIDAttribute. This is added when using the Metadata API and has no impact on the running of the sample.
This sample demonstrates:
Attribute injection using the metadata store API.
Using a callback mechanism to defer metadata registration.
To set up, build, and run the sample
Using Visual Studio 2010, open the ProgrammingMetadataStore.sln solution file.
To build the solution, press CTRL+SHIFT+B.
To run the solution, press F5.
The samples may already be installed on your machine. Check for the following (default) directory before continuing.