mono - Delegate in C# attribute -


I want to place a static representative inside the custom attribute. What I'm running into is the catalyst. The creative is a major bottle neck and I want to avoid it. I am using Mono and running on iOS so that compiled lambda is made and out of the question of any JITD method. What I was hoping for is a stable factory manufacturer on each class that has the specialty. Some will do:

  [CustomAtt ( "cold", Factory Method)] public class of Class {public static some Class Factory mode () {new new client ()}}} < / code> 

it gives me a compile error a constant expression of a trait, must be the expression or array creation expression

this is because That I am attributing it to that I am creating all the items which are already attributable And when I need to create an object then I have the attribute.

Is it another way, or create objects and fastest way to meet

looks like you want to assign names and types, like the method of reflection (once) and create a representative then you can do so within the potentially specialty manufacturer, though I specifically I greatly reduce myself in specialty forms.

However, it requires reflection and the ability to create a representative on the fly, I expect them to be supported in mono on both iOS (I think by which you mean that you Your solutions are rolling up, until you Xamarin.iOS).


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -