예제 #1
0
        private FieldType GuessTokenTypeFromArray(string name, RavenJArray array)
        {
            var token = array.First();

            switch (token.Type)
            {
            case JTokenType.Object:
                return(GenerateClassTypesFromObject(name, (RavenJObject)token));

            case JTokenType.Array:
                return(GuessTokenTypeFromArray(name, (RavenJArray)token));

            default:
                return(GetTokenTypeFromPrimitiveType(token));
            }

            throw new NotSupportedException("We shouldn't have hit this.");
        }