protected static void AsTextDescription(CodeWriter writer, MemberInfo memberInfo)
        {
            const RenderFlags flags = RenderFlags.ShowParentTypes | RenderFlags.NoPreAnnotations;

            switch (memberInfo.MemberType)
            {
            case MemberTypes.TypeInfo:
            case MemberTypes.NestedType:
                TypeRefBase.AsTextType(writer, (Type)memberInfo, flags | RenderFlags.Description);
                break;

            case MemberTypes.Constructor:
                ConstructorRef.AsTextConstructorInfo(writer, (ConstructorInfo)memberInfo, flags);
                break;

            case MemberTypes.Method:
                MethodRef.AsTextMethodInfo(writer, (MethodInfo)memberInfo, flags);
                break;

            case MemberTypes.Property:
                PropertyRef.AsTextPropertyInfo(writer, (PropertyInfo)memberInfo, flags);
                break;

            case MemberTypes.Field:
                FieldRef.AsTextFieldInfo(writer, (FieldInfo)memberInfo, flags);
                break;

            case MemberTypes.Event:
                EventRef.AsTextEventInfo(writer, (EventInfo)memberInfo, flags);
                break;

            default:
                writer.Write(memberInfo.ToString());
                break;
            }
        }