AutoFixture/AutoFixture — pull request #126 by markwoodhall (2013-06-22 19:52:41+00:00)
Title: #92 [NoAutoProperties] Attibute

Sorry about the second pull request, I had some git issues when I attempted to rebase my changes after I addressed the issues raised in the original pull request https://github.com/AutoFixture/AutoFixture/pull/121

---

There is now a `[NoAutoProperties]` attribute that will disable automatic property population for a specified type.

Given the following example, second and third will have automatic property population disabled but first will have automatic property population enabled or as specified in MyAutoData.

```c#
[Theory, MyAutoData]
public void OmitsAutoPropertiesOnlyForSecondParameterAndNotThird(
Foo first,
[NoAutoProperties]Foo second,
Foo third)
{
Assert.NotEqual(0, first.AutoPropertyInt);
Assert.NotEqual(null, first.AutoPropertString);
Assert.Equal(0, second.AutoPropertyInt);
Assert.Equal(null, second.AutoPropertString);
Assert.NotEqual(0, third.AutoPropertyInt);
Assert.NotEqual(null, third.AutoPropertString);
}
```