Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Pass an argument to value provider
 

Pass an argument to value provider

Hi there,

How do I pass information into a value provider? The doco just has the method signatures, but some of the provided value providers come with the ability to pass in extra information (such as the expression for Evaluator value provider. How do I add something like that to my value provider class?

Thanks
Ben
Ben Scott - Aust  Thursday, October 04, 2007 7:50 AM

Hi Ben,

To pass extra information you should implement the IAttributesConfigurable interface in your valueprovider. That inteface has Configure method which receives a dictionary with the key-value collection of the attributes provided in the manifest like following:

Code Block

<ValueProvider Type="Foo.ValueProviders.ProjectByPathProvider, Foo"
MyExtraInformation="MyConsole"/>

hth

jose.

Jose Escrich  Thursday, October 04, 2007 3:30 PM

Hi Ben,

To pass extra information you should implement the IAttributesConfigurable interface in your valueprovider. That inteface has Configure method which receives a dictionary with the key-value collection of the attributes provided in the manifest like following:

Code Block

<ValueProvider Type="Foo.ValueProviders.ProjectByPathProvider, Foo"
MyExtraInformation="MyConsole"/>

hth

jose.

Jose Escrich  Thursday, October 04, 2007 3:30 PM
Thankyou, that worked a treat Smile.
Ben Scott - Aust  Friday, October 05, 2007 1:00 AM

You can use google to search for other answers

Custom Search

More Threads

• Replacing Project Name
• WCSF June 2007 with .Net Framework 3.0 SP1
• GAX/GAT Custom Menu won't update after second Build/Registration
• How to do simple recipe alteration to solicit additional string for recipe substitution
• Newbie Problem
• Project Type "Service Factory: Modeling Edition" not found under Guidance Packages
• Error 1001 The project factory CSharp is not registered
• Automated Testing
• t4 help
• GAT & GAX Install Error