I am trying to generate auto propery using codedom but with no luck. I tried different solutions and each one causing issue. I am trying to generate something like below
[FindsBy(How = How.Id, Using = "AllTabs")]
public IWebElement SaveButton { get; set; }
I was able to create attribute with no issue but unable to create auto property.
if I try to use the solution listed from here autoproperty i.e
CodeTypeDeclaration newType = new CodeTypeDeclaration("TestType");
CodeSnippetTypeMember snippet = new CodeSnippetTypeMember();
snippet.Comments.Add(new CodeCommentStatement("this is integer property", true));
snippet.Text="public int IntergerProperty { get; set; }";
newType.Members.Add(snippet);
Then I am unable to add the attribute over the Property, it just prints out the property without the attribute. Is there any way to generate auto property and also use attributes?