Пример #1
0
 public override IBuildIntention <IBlockDefinition> GetBuildIntention(IConversionContext context)
 {
     var(toBuild, maker) = BlockDefinition.Create();
     return(new BuildIntention <IBlockDefinition>(toBuild, () =>
     {
         maker.Build(
             Scope.Convert(context),
             Body.Select(x => x.GetOrThrow().ConvertElementOrThrow(context)).ToArray(),
             StaticInitailizers.Select(x => x.GetOrThrow().ConvertElementOrThrow(context)).ToArray());
     }));
 }
Пример #2
0
 public override IBuildIntention <IInternalMethodDefinition> GetBuildIntention(IConversionContext context)
 {
     var(toBuild, maker) = MethodDefinition.Create();
     return(new BuildIntention <IInternalMethodDefinition>(toBuild, () =>
     {
         maker.Build(
             OutputType.Is1OrThrow().Convert(context),
             ParameterDefinition.Convert(context),
             Scope.Is1OrThrow().Convert(context),
             Body.GetValue().Select(x => x.Is1OrThrow().GetValue().ConvertElementOrThrow(context)).ToArray(),
             StaticInitailizers.Select(x => x.GetOrThrow().ConvertElementOrThrow(context)).ToArray());
     }));
 }