{"id":2314,"date":"2022-08-30T15:23:50","date_gmt":"2022-08-30T15:23:50","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/05\/problem-about-castle-dynamicproxy-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:23:50","modified_gmt":"2022-08-30T15:23:50","slug":"problem-about-castle-dynamicproxy-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-castle-dynamicproxy-collection-of-common-programming-errors\/","title":{"rendered":"problem about castle-dynamicproxy-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li>\n<img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f8a7b10d0e345ecab36cc69d69d8e49e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npeer<br \/>\nnhibernate castle-dynamicproxy dynamic-proxy<br \/>\nI&#8217;m working on a problem in which I have a number of entities, each of which has a corresponding one-to-many translations table, which specify the localized versions of entity&#8217;s fields. (all of this is legacy schema I&#8217;m adding a map on top of). For example:EventIDEventTranslationEventID Language Title other fieldsSo, if I were going to render my information in Greek, I&#8217;d join the two tables and specify Language = &#8216;Greek&#8217; and have all the right stuff.What I&#8217;m trying to do is build on-the-fly mixi<\/li>\n<li>\n<img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4e51620640a9e6b4fae81b1189a41e37?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRafael Steil<br \/>\nc# generics mono moq castle-dynamicproxy<br \/>\nI found a really strange problem while creating unit tests that only occurs with the Mono runtime (Xamarin on Mac included), but runs fine within Visual Studio. I isolated it as far as I could, and I reached a point that I can&#8217;t tell if it is a bug with Mono, Moq or Castle DinamicProxy, although it only crashes when using the Mono runtime. This is the code:using System; using System.Collections.Generic; using Moq;namespace ConsoleApplication1 {public interface ISomething&lt;T&gt;{List&lt;T&gt; D<\/li>\n<li>\n<img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/19e48145117250598f8a32189027288e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDavide Icardi<br \/>\nc# json.net signalr castle-dynamicproxy<br \/>\nI have some problems invoking a signalr hub when the returned object is a Castle DynamicProxy.Let&#8217;s say that I have the following server code on the signalr hub (this is not the real code but just to show the problem):public Article Read() {var article = new Article(0);return article; } public class Article {public Article(int id){Id = id;}public int Id { get; set; } }The above method correctly returns my object. If I change this code to:public Article Read() {var proxyGenerator = new Castle.Dyn<\/li>\n<li>\n<img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/eeb54edab107fb3d31133ed009abd863?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRuben Bartelink<br \/>\nc# .net dependency-injection ninject castle-dynamicproxy<br \/>\nI trying to build nice architecture for my project and I decided to use Ninject as DI and Castle project dinamic proxy to add the caching for my repositories. Unfortunatly I get a exception. Here is my code:public class NinjectImplementation : NinjectModule {public override void Load(){\/\/ Binding repositoriesvar assembly = Assembly.GetAssembly(typeof(UserRepository));var types = assembly.GetTypes().Where(t =&gt; t.Name.EndsWith(&#8220;Repository&#8221;) &amp;&amp; !t.Name.StartsWith(&#8220;I&#8221;));ProxyGenerator gen<\/li>\n<li>\n<img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/CV8bs.png?s=32&amp;g=1\" \/><br \/>\nSebastian K<br \/>\nc# .net castle-dynamicproxy<br \/>\nI am probably missing something extremely simple.I am just trying to write a very minimalistic example of usage of DynamicProxy &#8211; I basically want to intercept the call and display method name and parameter value. I have code as follows:public class FirstKindInterceptor : IInterceptor {public void Intercept(IInvocation invocation){Console.WriteLine(&#8220;First kind interceptor before {0} call with parameter {1} &#8220;, invocation.Method.Name, invocation.Arguments[0]);invocation.Proceed();Console.WriteLine<\/li>\n<li>\n<img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/30ffb042445b66f1cba91aaff019a3eb?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmrblah<br \/>\nnhibernate castle castle-dynamicproxy<br \/>\nSo I pulled the source from https:\/\/svn.castleproject.org\/svn\/castle\/DynamicProxy\/trunk\/Open it up in vs.net 2008problems:vs.net can&#8217;t open the assembly.cs assembly signing failedWhat am I doing, rather NOT doing?UpdateSo I downloaded nant, setup the .bat file in my PATH so it works in cmd prompt.I ran:nant default.buildGetting this error:build failed, \\buildscripts\\common-project.xml (48,3) invalid element . Unknown task or datatype.How exactly do I build the dynamicProxy project now?update Th<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2014-01-05 10:08:56. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>peer nhibernate castle-dynamicproxy dynamic-proxy I&#8217;m working on a problem in which I have a number of entities, each of which has a corresponding one-to-many translations table, which specify the localized versions of entity&#8217;s fields. (all of this is legacy schema I&#8217;m adding a map on top of). For example:EventIDEventTranslationEventID Language Title other fieldsSo, if I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2314","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2314"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2314\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}