public ObjectSerialization Build(KnownMediaType mediaType, Schema schema, CSharpType type)
        {
            switch (mediaType)
            {
            case KnownMediaType.Json:
                return(BuildSerialization(schema, type));

            case KnownMediaType.Xml:
                return(BuildXmlElementSerialization(schema, type, schema.XmlName ?? schema.Name, true));

            default:
                throw new NotImplementedException(mediaType.ToString());
            }
        }
        public ObjectSerialization BuildObject(KnownMediaType mediaType, ObjectSchema objectSchema, ObjectType type)
        {
            switch (mediaType)
            {
            case KnownMediaType.Json:
                return(BuildJsonObjectSerialization(objectSchema, type));

            case KnownMediaType.Xml:
                return(BuildXmlObjectSerialization(objectSchema, type));

            default:
                throw new NotImplementedException(mediaType.ToString());
            }
        }