Skip to content

Commit

Permalink
Doku
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberblast committed Nov 18, 2017
1 parent f4bb1b5 commit bbf2c59
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace ConsoleApp1 {
ctx.Load(web, w => w.Title);
ctx.ExecuteQuery();
Console.Write(web.Title);
Console.ReadLine();
});
}
}
Expand All @@ -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<TMGAuthenticator>("http://yourSharePointUrl", "domain", "loginName", "password");
ISPClient client = new SPClient<TMGAuthenticator>(
"http://yourSharePointUrl",
"domain",
"loginName",
"password");
client.Authenticate();
```

Expand All @@ -53,16 +59,23 @@ namespace ConsoleApp1 {
class Program {
const int ROW_LIMIT = 100;
static void Main(string[] args) {
ISPClient client = new SPClient<TMGAuthenticator>("http://yourSharePointUrl", "domain", "loginName", "password");
ISPClient client = new SPClient<TMGAuthenticator>(
"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<int>("numberField");
string author = item.GetValue<FieldUserValue, string>(
"Author",
(fieldUserValue) => fieldUserValue.LookupValue);
}

client.Execute(ctx =>
Expand Down

0 comments on commit bbf2c59

Please sign in to comment.