Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#326 #51

Merged
merged 5 commits into from
Jun 24, 2013
Merged

#326 #51

merged 5 commits into from
Jun 24, 2013

Conversation

stoo101
Copy link
Contributor

@stoo101 stoo101 commented Jun 20, 2013

Test and proposed fix for issue #326.

DynamicProxy cannot replicate
System.Security.Permissions.UIPermissionAttribute, so tell it not to
try.
@@ -135,7 +135,8 @@ private void InitializeInstance()
{
PexProtector.Invoke(() =>
{
this.instance = proxyFactory.CreateProxy<T>(
Castle.DynamicProxy.Generators.AttributesToAvoidReplicating.Add(typeof(System.Security.Permissions.UIPermissionAttribute));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should actually go into the CastleProxyFactory static constructor, which is the one that sets the attributes to skip.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pointer Daniel - I've updated accordingly.

Added System.Security.Permissions.UIPermissionAttribute to list of
attributes that we tell Castle not to replicate.
kzu added a commit that referenced this pull request Jun 24, 2013
Added support for mocking WinForms controls #326.

Thanks @stoo101!
@kzu kzu merged commit 17085ab into devlooped:dev Jun 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants