public CodeMemberMethod NewElementMappingMethod(CodeGenerationContext ctx, ICodeGeneratorNode element) { CodeMemberMethod method = AddNewMethod(); element.GenerateMappingCode(ctx, method); return(method); }
public override void GenerateMappingCode(CodeGenerationContext ctx, CodeMemberMethod method) { if (!string.IsNullOrEmpty(_key)) { ICodeGeneratorNode element = ctx.MapInfo.GetNamedMapping(_key); Guard.NotNull(element, "Named mapping '{0}' not found for {1}", _key, ctx.MappedObjectType.FullName); element.To = To; element.GenerateMappingCode(ctx, method); } }