Is there any duck typing library for Silverlight? There are a few for the full-blown .NET framework, but I’m looking for something lighter.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
By asking for “Silverlight duck typing” are you refering to the strongly-typed automatic implementation of interfaces? Or the dynamic creation of object metadata through using an object instance?
If it’s the latter, Anthony’s recommendation is spot on.
Strongly-typed languages that run on the CLR (C# and VB.NET) cannot support true dynamic duck typing. Thus, you can use IronRuby or IronPython that ship as part of the Silverlight DLR project.
If you’re looking for the former, then you’re essiantially looking for a mocking library.
Silverlight supports a myriad of open source mocking frameworks.
Moq – http://code.google.com/p/moq/ (download: http://moq.googlecode.com/files/Moq.Silverlight.4.0.812.4-bin.zip)
RhinoMocks – http://ayende.com/projects/rhino-mocks.aspx (download: http://ayende.com/20/section.aspx/download/230)
AutoFac – http://code.google.com/p/autofac/ (download: http://autofac.googlecode.com/files/Autofac-1.4.4.572-SL3.zip)
TypeMock / SilverUnit – http://cthru.codeplex.com (download: http://cthru.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27748#DownloadId=69201)