If you are a member of the Office 2010 Technical Preview program, you have all you need to write your first SharePoint 2010 application.
How? Well, the Office 2010 integration with SharePoint 2010 means that you’ll get a few interesting DLL files added to your Office installation folder, especially when installing SharePoint Designer 2010 and Visio 2010.
BTW, this information was first published in issue 2 of the SharePoint 2010 Beta series of Understanding SharePoint Journal.
These files are proxy DLLs and wont actually interact with SharePoint, but they are still extremely interesting from a developer’s point of view as they are effectively a complete listing of the new Microsoft.SharePoint.Client namespace.
This will be an extremely simple demo, and you’ll need to have the SharePoint Designer 2010 Technical Previews installed. Well, actually, you’ll need a DLL that installs as part of that application, Microsoft.SharePoint.Client.Local.dll.
Start a new Visual Studio project; any version of Visual Studio will do. The project type should be Console Application, and you can name it pretty much anything you like.
Next, add a reference to the Microsoft.SharePoint.Client.Local.dll file, usually located in the C:\Program Files\Microsoft Office\Office14 folder (or the equivalent in an x64 OS).
Inside the Program.cs file, add a using Microsoft.SharePoint.Client; statement at the top, and then paste the following code in the Main function:
foreach (int s in Enum.GetValues(typeof(ListTemplateType)))
{
Console.WriteLine(
string.Format("{0}\t{1}",
Enum.GetName(typeof(ListTemplateType), s), s
)
);
}
Console.ReadLine();
Build, run, and enjoy the output, which should resemble the result below.
Here’s the list in text format, with the new list times highlighted:
| NoListTemplate | 0 |
| GenericList | 100 |
| DocumentLibrary | 101 |
| Survey | 102 |
| Links | 103 |
| Announcements | 104 |
| Contacts | 105 |
| Events | 106 |
| Tasks | 107 |
| DiscussionBoard | 108 |
| PictureLibrary | 109 |
| DataSources | 110 |
| WebTemplateCatalog | 111 |
| UserInformation | 112 |
| WebPartCatalog | 113 |
| ListTemplateCatalog | 114 |
| XMLForm | 115 |
| MasterPageCatalog | 116 |
| NoCodeWorkflows | 117 |
| WorkflowProcess | 118 |
| WebPageLibrary | 119 |
| CustomGrid | 120 |
| SolutionCatalog | 121 |
| NoCodePublic | 122 |
| ThemeCatalog | 123 |
| DataConnectionLibrary | 130 |
| WorkflowHistory | 140 |
| GanttTasks | 150 |
| Meetings | 200 |
| Agenda | 201 |
| MeetingUser | 202 |
| Decision | 204 |
| MeetingObjective | 207 |
| TextBox | 210 |
| ThingsToBring | 211 |
| HomePageLibrary | 212 |
| Posts | 301 |
| Comments | 302 |
| Categories | 303 |
| Facility | 402 |
| Whereabouts | 403 |
| CallTrack | 404 |
| Circulation | 405 |
| Timecard | 420 |
| Holidays | 421 |
| IMEDic | 499 |
| AssetLibrary | 851 |
| IssueTracking | 1100 |
| AdminTasks | 1200 |
| HealthRules | 1220 |
| HealthReports | 1221 |
| InvalidType | -1 |
Using .NET Reflector you can open any of these DLLs to start exploring the SharePoint 2010 object model right now.
.b





0 comments:
Post a Comment