Ejemplo n.º 1
0
        public static IMemberDefinition Convert(IIsPossibly <IWeakTypeReference> Type, IConversionContext context, bool ReadOnly, IKey Key)
        {
            var(def, builder) = MemberDefinition.Create();

            var buildIntention = Type.GetOrThrow().TypeDefinition.GetOrThrow().GetValue().GetOrThrow().Cast <IConvertable <IVerifiableType> >().GetBuildIntention(context);

            buildIntention.Build();
            builder.Build(Key, buildIntention.Tobuild, ReadOnly);
            return(def);
        }
Ejemplo n.º 2
0
 public static IBuildIntention <IMemberDefinition> GetBuildIntention(IIsPossibly <IWeakTypeReference> Type, IConversionContext context, bool ReadOnly, IKey Key)
 {
     var(toBuild, maker) = MemberDefinition.Create();
     return(new BuildIntention <IMemberDefinition>(toBuild, () =>
     {
         maker.Build(
             Key,
             Type.GetOrThrow().TypeDefinition.GetOrThrow().GetValue().GetOrThrow().ConvertTypeOrThrow(context),
             ReadOnly);
     }));
 }
Ejemplo n.º 3
0
 public static IBuildIntention <IVerifiableType> GetBuildIntention(IIsPossibly <IBox <IIsPossibly <IFrontendType> > > TypeDefinition, IConversionContext context)
 {
     if (TypeDefinition.GetOrThrow().GetValue().GetOrThrow() is IConvertableFrontendType <IVerifiableType> convertableType)
     {
         return(convertableType.GetBuildIntention(context));
     }
     else
     {
         throw new Exception("can not be built, type is not convertable");
     }
 }