Esempio n. 1
0
        public override Type GetSystemType(TyonHydraterBase hydrater)
        {
            IEnumerable <Filterer <Type> > filters = new Filterer <Type>[] {
                Filterer_Type.IsNamed(GetName()),
                Filterer_Type.IsNonNestedClass(),
                Filterer_Type.IsNonGenericClass()
            };

            return(Types.GetFilteredTypes(
                       filters.AppendIf(
                           HasNamespace(),
                           Filterer_Type.IsNamespace(GetNamespace())
                           )
                       ).GetFirst()
                   .ChainIfNull(t => hydrater.LogMissingType(GetId())));
        }
Esempio n. 2
0
        public override Type GetSystemType(TyonHydraterBase hydrater)
        {
            Type[] generic_arguments = GetTyonTypes()
                                       .Convert(t => t.GetSystemType(hydrater))
                                       .ToArray();

            IEnumerable <Filterer <Type> > filters = new Filterer <Type>[] {
                Filterer_Type.IsBasicNamed(GetName()),
                Filterer_Type.IsGenericClass(),
                Filterer_Type.IsNonNestedClass(),
                Filterer_Type.CanGenericParametersHold(generic_arguments)
            };

            Type generic_type = Types.GetFilteredTypes(
                filters.AppendIf(
                    HasNamespace(),
                    Filterer_Type.IsNamespace(GetNamespace())
                    )
                ).GetFirst()
                                .ChainIfNull(t => hydrater.LogMissingType(GetId()));

            return(generic_type.MakeGenericType(generic_arguments));
        }
Esempio n. 3
0
 public override Type GetSystemType(TyonHydraterBase hydrater)
 {
     return(GetTyonType().GetSystemType(hydrater).IfNotNull(t => t.MakeArrayType()));
 }
Esempio n. 4
0
 public abstract Type GetSystemType(TyonHydraterBase hydrater);