RegexMatchStringConverter  
Author Message
Tim Mercer





PostPosted: Visual Studio Guidance Automation Toolkit, RegexMatchStringConverter Top

Any help with this converter would be greatly appreciated. I have done the google search and search of this forum but no luck. The chm does not have docs for the ...Library.Converters namespace ... so, I am hoping someone can be of assistance.

Ideally I would like to use it in a recipe declaratively.

<Argument Name="DocumentationFeedbackEmail" Type="System.String" Required="true">

<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.RegexMatchStringConverter, Microsoft.Practices.RecipeFramework.Library"/>

</Argument>

How does one specify the actual RegEx Thanks in advance! Also, if a chm is available for the Library.Converters namespace that would be great to get ahold of.




Visual Studio16  
 
 
kzu





PostPosted: Visual Studio Guidance Automation Toolkit, RegexMatchStringConverter Top

If you open any class in Reflector, you will see that most of the classes that receive additional arguments to work (such as this case), define a public constant containing the name of the configuration attribute you must specify. In the case of this converter, here's what Reflector shows:

public const string ExpressionKey = "Expression";

So, that's the attribute you have to use to pass the expression:

<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.RegexMatchStringConverter, Microsoft.Practices.RecipeFramework.Library" Expression="[Your RegEx]"/>








 
 
Tim Mercer





PostPosted: Visual Studio Guidance Automation Toolkit, RegexMatchStringConverter Top

kzu:

Thank you for your kind reply ... found Reflector for .NET by Lutz Roeder (http://www.aisto.com/roeder/dotnet/) ... did as you suggested ... thank you for the answer and pointing me to a great tool.

Additionally, it is great to see the June CTP released!