The LoadFlags
differs a lot than say the ListBaseColumns
enumeration, in that its actually a flag based property and not just a standard enum. While ListBaseColumns
allows you to choose only ONE of the options, the LoadFlags lets you add mix and match by choosing one or many of the options.
When you create a new ReadOptions()
, the LoadFlags
property is set to None
by default. This is the minimal amount of data that you will get back with your xml. Any added flag can return additional data if available, or change how data is returned (like the KeywordXlinks
). Flags are added on top of the default data that is returned.
This system allows you to do things like... just return webdav info along with the default data...
ReadOptions options = new ReadOptions();
options.LoadFlags = LoadFlags.WebDavUrls;
As well as return webdav AND allowed actions data along with the default data...
ReadOptions options = new ReadOptions();
options.LoadFlags = LoadFlags.WebDavUrls | LoadFlags.IncludeAllowedActions;
If I wanted to get as much information as possible out, I could do something like:
ReadOptions options = new ReadOptions();
options.LoadFlags = LoadFlags.WebDavUrls | LoadFlags.KeywordXlinks | LoadFlags.Expanded | LoadFlags.IncludeAllowedActions | LoadFlags.IncludeDynamicVersionInfo;
Note that because they made the LoadFlags.None with a value of 0, it's technically always selected, even in the above example, as shown with the code (options.LoadFlags & LoadFlags.None) == LoadFlags.None
.
Hope that helps!