public void SetupEndMethod(Reflection.Emit.Interfaces.IMethodBuilder Method, Type BaseType, Reflection.Emit.BaseClasses.VariableBase ReturnValue) { Method.SetCurrentMethod(); if (ClassMappings.ContainsKey(BaseType) && Method.Name.StartsWith("get_")) { foreach (IMapping Mapping in ClassMappings[BaseType]) { string PropertyName = Method.Name.Replace("get_", ""); IProperty Property = Mapping.Properties.Find(x => x.Name == PropertyName); if (Property != null) { if (Property is IManyToOne || Property is IMap) { SetupSingleProperty(Method, BaseType, ReturnValue, Property, Mapping); } else if (Property is IIEnumerableManyToOne || Property is IManyToMany) { SetupIEnumerableProperty(Method, BaseType, ReturnValue, Property, Mapping); } else if (Property is IListManyToMany || Property is IListManyToOne) { SetupListProperty(Method, BaseType, ReturnValue, Property, Mapping); } return; } } } }
public void SetupStartMethod(Reflection.Emit.Interfaces.IMethodBuilder Method, Type BaseType) { Method.SetCurrentMethod(); if (ClassMappings.ContainsKey(BaseType) && Method.Name.StartsWith("set_")) { foreach (IMapping Mapping in ClassMappings[BaseType]) { string PropertyName = Method.Name.Replace("set_", ""); IProperty Property = Mapping.Properties.Find(x => x.Name == PropertyName); if (Property != null) { Utilities.Reflection.Emit.FieldBuilder Field = Fields.Find(x => x.Name == Property.DerivedFieldName); if (Field != null) { Field.Assign(Method.Parameters[1]); } return; } } } }
public void SetupExceptionMethod(Reflection.Emit.Interfaces.IMethodBuilder Method, Type BaseType) { }