private void ImplementMixinMethods() { IEnumerable <Type> mixinTypes = this.mixinsModel.GetMixinTypes(); foreach (Type mixinType in mixinTypes) { foreach (MethodInfo method in mixinType.GetMethods()) { MixinModel mixinModel = this.mixinsModel.ImplementMethod(method); MethodConcernsModel methodConcernsModel = this.concernsModel.ConcernsFor(method, mixinType); MethodConcernsModel mixinMethodConcernsModel = mixinModel.ConcernsFor(method, mixinType); methodConcernsModel = methodConcernsModel.CombineWith(mixinMethodConcernsModel); MethodSideEffectsModel methodSideEffectsModel = this.sideEffectsModel.SideEffectsFor(method, mixinType); MethodSideEffectsModel mixinMethodSideEffectsModel = mixinModel.SideEffectsFor(method, mixinType); methodSideEffectsModel = methodSideEffectsModel.CombineWith(mixinMethodSideEffectsModel); var methodConstraintsModel = new MethodConstraintsModel(method, this.constraintsModel); var compositeMethodModel = new CompositeMethodModel(methodConstraintsModel, methodConcernsModel, methodSideEffectsModel, this.mixinsModel); this.methods.Add(method, compositeMethodModel); } foreach (PropertyInfo property in mixinType.GetProperties()) { this.properties.Add(property); } } }
public Resolution(ApplicationModel application, LayerModel layer, ModuleModel module, ObjectDescriptor objectDescriptor, CompositeMethodModel method, FieldInfo field) { this.Application = application; this.Layer = layer; this.Module = module; this.ObjectDescriptor = objectDescriptor; this.Method = method; this.Field = field; }
private void ImplementMixinMethods() { IEnumerable<Type> mixinTypes = this.mixinsModel.GetMixinTypes(); foreach (Type mixinType in mixinTypes) { foreach (MethodInfo method in mixinType.GetMethods()) { MixinModel mixinModel = this.mixinsModel.ImplementMethod(method); MethodConcernsModel methodConcernsModel = this.concernsModel.ConcernsFor(method, mixinType); MethodConcernsModel mixinMethodConcernsModel = mixinModel.ConcernsFor(method, mixinType); methodConcernsModel = methodConcernsModel.CombineWith(mixinMethodConcernsModel); MethodSideEffectsModel methodSideEffectsModel = this.sideEffectsModel.SideEffectsFor(method, mixinType); MethodSideEffectsModel mixinMethodSideEffectsModel = mixinModel.SideEffectsFor(method, mixinType); methodSideEffectsModel = methodSideEffectsModel.CombineWith(mixinMethodSideEffectsModel); var methodConstraintsModel = new MethodConstraintsModel(method, this.constraintsModel); var compositeMethodModel = new CompositeMethodModel(methodConstraintsModel, methodConcernsModel, methodSideEffectsModel, this.mixinsModel); this.methods.Add(method, compositeMethodModel); } foreach (PropertyInfo property in mixinType.GetProperties()) { this.properties.Add(property); } } }