From bbf2c592b49a3337f6378743688c984d74ea85e7 Mon Sep 17 00:00:00 2001 From: cyberblast Date: Sat, 18 Nov 2017 20:16:12 +0100 Subject: [PATCH] Doku --- README.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 89b0106..ae07a96 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ namespace ConsoleApp1 { ctx.Load(web, w => w.Title); ctx.ExecuteQuery(); Console.Write(web.Title); - Console.ReadLine(); }); } } @@ -30,17 +29,24 @@ namespace ConsoleApp1 { ## Features -* Enter Name/Password +* Set Name/Password ```C# -ISPClient client = new SPClient("http://yourSharePointUrl", "domain", "loginName", "password"); -client.Authenticate(); +ISPClient client = new SPClient( + "http://yourSharePointUrl", + "domain", + "loginName", + "password"); ``` * Use different authentication procedures ```C# using cyberblast.SharePoint.Client.Authentication; [...] -ISPClient client = new SPClient("http://yourSharePointUrl", "domain", "loginName", "password"); +ISPClient client = new SPClient( + "http://yourSharePointUrl", + "domain", + "loginName", + "password"); client.Authenticate(); ``` @@ -53,16 +59,23 @@ namespace ConsoleApp1 { class Program { const int ROW_LIMIT = 100; static void Main(string[] args) { - ISPClient client = new SPClient("http://yourSharePointUrl", "domain", "loginName", "password"); + ISPClient client = new SPClient( + "http://yourSharePointUrl", + "domain", + "loginName", + "password"); client.Authenticate(); - var filter = QueryBuilder.Eq( + var filter = QueryBuilder.Equals( new QueryBuilder.Field("Id"), new QueryBuilder.Value(7, FieldType.Number)); var query = QueryBuilder.Query(filter, ROW_LIMIT); void Callback(ListItem item) { - Console.WriteLine(item.Id); + int number = item.GetValue("numberField"); + string author = item.GetValue( + "Author", + (fieldUserValue) => fieldUserValue.LookupValue); } client.Execute(ctx =>