public CSCodeGenerationResult Implement(IActivityMonitor monitor, MethodInfo m, ICSCodeGenerationContext c, ITypeScope b) { IFunctionScope mB = b.CreateOverride(m); mB.Parent.Should().BeSameAs(b, "The function is ready to be implemented."); if (IsLambda) { mB.Append("=> ").Append(ActualCode).Append(';').NewLine(); } else { mB.Append(ActualCode); } return(CSCodeGenerationResult.Success); }
public CSCodeGenerationResult Implement(IActivityMonitor monitor, MethodInfo m, ICSCodeGenerationContext codeGenContext, ITypeScope typeBuilder) { IFunctionScope mB = typeBuilder.CreateOverride(m); Debug.Assert(mB.Parent == typeBuilder, "The function is ready to be implemented."); if (_attr.IsLambda) { mB.Append("=> ").Append(_attr.ActualCode).Append(';').NewLine(); } else { mB.Append(_attr.ActualCode).NewLine(); } return(CSCodeGenerationResult.Success); }