Beispiel #1
0
 public override IBuildIntention <IInternalMethodDefinition> GetBuildIntention(IConversionContext context)
 {
     var(toBuild, maker) = MethodDefinition.Create();
     return(new BuildIntention <IInternalMethodDefinition>(toBuild, () =>
     {
         maker.Build(
             InputType.GetOrThrow().TypeDefinition.GetOrThrow().GetValue().GetOrThrow().ConvertTypeOrThrow(context),
             OutputType.GetOrThrow().TypeDefinition.GetOrThrow().GetValue().GetOrThrow().ConvertTypeOrThrow(context),
             ParameterDefinition.GetOrThrow().GetValue().GetOrThrow().Convert(context),
             Scope.Convert(context),
             Body.Select(x => x.GetOrThrow().ConvertElementOrThrow(context)).ToArray(),
             StaticInitailizers.Select(x => x.GetOrThrow().ConvertElementOrThrow(context)).ToArray(),
             IsEntryPoint);
     }));
 }