Tutorial by Examples: v

ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; clientContext.Load( oWebsite, website => website.Title, website => website.Created); clientContext.ExecuteQuery(); Console.WriteLine("Title: {...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; clientContext.Load(collList); clientContext.ExecuteQuery(); foreach (List oList in collList) { Console.WriteLine("Title: {0} Created: {1}",...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; clientContext.Load( collList, lists => lists.Include( list => list.Title, list => list.Id)); clientContext.ExecuteQuery(...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; IEnumerable<List> resultCollection = clientContext.LoadQuery( collList.Include( list=>list.Title, list=>list.Id)); clientCo...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; IEnumerable<SP.List> listInfo = clientContext.LoadQuery( collList.Include( list => list.Title, list => list.Fields.Include( ...
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = "<View><Query><Where><Geq><FieldRef Name='ID'/>" + &qu...
This example shows how to retrieve items from the server as well as get deeper properties of each list item. By default, the server will only return the minimum amount of data to represent the object. It is up to the caller to request additional information from the server. ClientContext clientCont...
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); CamlQuery camlQuery = new CamlQuery(); ListItemCollection collListItem = oList.GetItems(camlQuery); clientContext.Load( collListItem, items =>...
ClientContext clientContext = new ClientContext(siteUrl); ListCollection collList = clientContext.Web.Lists; clientContext.Load( collList, lists => lists.Where( list => list.Hidden == false).Include( list => list.Title, list => list.Items.Take(10)...
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); ListItemCollectionPosition itemPosition = null; while (true) { CamlQuery camlQuery = new CamlQuery(); camlQuery.ListItemCollectionPosition = it...
ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); GroupCollection collGroup = clientContext.Web.SiteGroups; Group oGroup = collGroup.GetById(7); UserCollection collUser = oGroup.Users; clientContext.Load(collUser); clientContext.ExecuteQuer...
ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); GroupCollection collGroup = clientContext.Web.SiteGroups; Group oGroup = collGroup.GetById(7); UserCollection collUser = oGroup.Users; clientContext.Load(collUser, users => users.Includ...
ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); GroupCollection collGroup = clientContext.Web.SiteGroups; clientContext.Load(collGroup); clientContext.Load(collGroup, groups => groups.Include( group => group.Users)); ...
extern crate serde; extern crate serde_json; #[macro_use] extern crate serde_derive; #[derive(Deserialize, Debug)] struct Request { // Use the result of a function as the default if "resource" is // not included in the input. #[serde(default="default_resource&quot...
[HttpPost] public ActionResult ContactUs(ContactUsModel contactObject) { // This line checks to see if the Model is Valid by verifying each Property in the Model meets the data validation rules if(ModelState.IsValid) { } return View(contactObject); } The model class p...
Groovy has access to all java classes, in fact Groovy classes ARE Java classes and can be run by the JVM directly. If you are working on a Java project, using Groovy as a simple scripting language to interact with your java code is a no-brainer. To make things even better, nearly any Java class ca...
(This pitfall applies equally to all primitive wrapper types, but we will illustrate it for Integer and int.) When working with Integer objects, it is tempting to use == to compare values, because that is what you would do with int values. And in some cases this will seem to work: Integer int1_1 =...
The .format() method can interpret a number in different formats, such as: >>> '{:c}'.format(65) # Unicode character 'A' >>> '{:d}'.format(0x0a) # base 10 '10' >>> '{:n}'.format(0x0a) # base 10 using current locale for separators '10' Format integers to d...
union U { int a; short b; float c; }; U u; u.a = 10; if (u.b == 10) { // this is undefined behavior since 'a' was the last member to be // written to. A lot of compilers will allow this and might issue a // warning, but the result will be "as expected"; thi...
Explicit casting operators can be used to perform conversions of numeric types, even though they don't extend or implement one another. double value = -1.1; int number = (int) value; Note that in cases where the destination type has less precision than the original type, precision will be lost....

Page 71 of 296