The ServerDocument object was aptly named. It was primarily designed for exactly the scenario we have just explored: writing information into a document on a server. It can do a lot more, however, from reading the data back out of a document to updating the deployment information inside a document to adding customizations to documents. We discuss the portions of the ServerDocument object model used in deployment scenarios in Chapter 20, "Deployment," and spend the rest of this chapter describing the data-manipulating tools in the ServerDocument in more detail. Let's take a look at another illustrative use of the ServerDocument object; then we'll give a more complete explanation of all its data properties and methods. Listing 18.4 gives a handy console application that dumps out the cached data manifest and serialized cached data in a document. Listing 18.4. Creating a Cache Viewer with ServerDocument
After you compile this into a console application, you can run the console application on the command line and pass the name of the document you want to view. The document must have a saved VSTO data island in it for anything interesting to happen. Now that you have an idea of how the ServerDocument object model is used, we can talk about it in more detail. |