Esempio n. 1
0
 private static void prepareField(ClassDefinition cls){
     cls.FindOrCreateMember<Field>("_data", f => f
                                                     .Static().Private().As<IDictionary<string, object>>()
                                                     .Init("buildData"));
 }
Esempio n. 2
0
 private static void preparePublicProperty(ClassDefinition cls){
     cls.FindOrCreateMember<Property>("Data", f => f
                                                       .Static().As<IDictionary<string, object>>()
                                                       .ReturnsField("_data")
                                                       .NoSetter());
 }
Esempio n. 3
0
 private static Method getBuilderMethod(ClassDefinition cls){
     return cls.FindOrCreateMember<Method>("buildData",
                                           f => f
                                                    .Private().Static().As<IDictionary<string, object>>()
                                                    .Append(Variable.Define(resultVar,
                                                                            typeof (Dictionary<string, object>)))
                                                    .Append(Variable.Return(resultVar)));
 }