Exemple #1
0
        public override void Dehydrate(HuskWriter writer, Type to_dehydrate)
        {
            if (to_dehydrate != null)
            {
                writer.WriteInt(to_dehydrate.MetadataToken);
                writer.WriteRecurrant(to_dehydrate.Module, ModuleHusker.INSTANCE);

                if (to_dehydrate.IsGenericClass())
                {
                    if (writer.WriteBoolBranch(to_dehydrate.IsGenericTypedClass()))
                    {
                        TypeListHusker.INSTANCE.Dehydrate(writer, to_dehydrate.GetGenericArguments().ToList());
                    }
                }
            }
            else
            {
                writer.WriteInt(0);
            }
        }
Exemple #2
0
        public override void Dehydrate(HuskWriter writer, MethodInfoEX to_dehydrate)
        {
            if (to_dehydrate != null)
            {
                writer.WriteInt(to_dehydrate.MetadataToken);
                writer.WriteRecurrant(to_dehydrate.DeclaringType, TypeHusker.INSTANCE);

                if (to_dehydrate.IsGenericMethod())
                {
                    if (writer.WriteBoolBranch(to_dehydrate.IsGenericTypedMethod()))
                    {
                        TypeListHusker.INSTANCE.Dehydrate(writer, to_dehydrate.GetGenericArguments().ToList());
                    }
                }
            }
            else
            {
                writer.WriteInt(0);
            }
        }