public static string GetPath <TDocument, TContent>(IExtendedTypeSerializer serializer, Expression <Func <TDocument, TContent> > path) { if (serializer == null) { throw new ArgumentNullException("serializer"); } if (path == null) { throw new ArgumentNullException("path"); } var visitor = new SubDocumentPathExpressionVisitor(serializer); visitor.Visit(path); return(visitor.Path); }