Skip to content

Commit

Permalink
version up
Browse files Browse the repository at this point in the history
  • Loading branch information
Happi-cat committed Dec 17, 2015
1 parent ceb5def commit 11b2d9e
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 266 deletions.
78 changes: 39 additions & 39 deletions Untech.SharePoint.Client/Data/SpListItemsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ public SpListItemsProvider(ClientContext clientContext, SpCommonService commonSe

private List SpList { get; set; }

protected override IList<ListItem> FetchInternal(string caml)
{
var listCollection = SpList.GetItems(CamlUtility.CamlStringToSPQuery(caml));
protected override IList<ListItem> FetchInternal(string caml)
{
var listCollection = SpList.GetItems(CamlUtility.CamlStringToSPQuery(caml));

ClientContext.Load(listCollection);
ClientContext.ExecuteQuery();
ClientContext.Load(listCollection);
ClientContext.ExecuteQuery();

return listCollection.Cast<ListItem>().ToList();
}
return listCollection.Cast<ListItem>().ToList();
}

protected override ListItem GetInternal(int id, MetaContentType contentType)
{
var spItem = SpList.GetItemById(id);
protected override ListItem GetInternal(int id, MetaContentType contentType)
{
var spItem = SpList.GetItemById(id);
ClientContext.Load(spItem, n => n, n => n.ContentType.StringId);
ClientContext.ExecuteQuery();

Expand All @@ -47,44 +47,44 @@ protected override ListItem GetInternal(int id, MetaContentType contentType)
throw new InvalidOperationException("ContentType mismatch");
}

return spItem;
}
return spItem;
}

protected override void AddInternal(object item, MetaContentType contentType)
{
var mapper = contentType.GetMapper<ListItem>();
protected override void AddInternal(object item, MetaContentType contentType)
{
var mapper = contentType.GetMapper<ListItem>();

var info = new ListItemCreationInformation();
var spItem = SpList.AddItem(info);
var info = new ListItemCreationInformation();
var spItem = SpList.AddItem(info);

mapper.Map(item, spItem);
mapper.Map(item, spItem);

spItem.Update();
ClientContext.ExecuteQuery();
}
spItem.Update();
ClientContext.ExecuteQuery();
}

protected override void UpdateInternal(int id, object item, MetaContentType contentType)
{
var mapper = contentType.GetMapper<ListItem>();
protected override void UpdateInternal(int id, object item, MetaContentType contentType)
{
var mapper = contentType.GetMapper<ListItem>();

var spItem = SpList.GetItemById(id);
ClientContext.Load(spItem);
ClientContext.ExecuteQuery();
var spItem = SpList.GetItemById(id);
ClientContext.Load(spItem);
ClientContext.ExecuteQuery();

mapper.Map(item, spItem);
mapper.Map(item, spItem);

spItem.Update();
ClientContext.ExecuteQuery();
}
spItem.Update();
ClientContext.ExecuteQuery();
}

protected override void DeleteInternal(int id, MetaContentType contentType)
{
var spItem = SpList.GetItemById(id);
ClientContext.Load(spItem);
ClientContext.ExecuteQuery();
protected override void DeleteInternal(int id, MetaContentType contentType)
{
var spItem = SpList.GetItemById(id);
ClientContext.Load(spItem);
ClientContext.ExecuteQuery();

spItem.DeleteObject();
ClientContext.ExecuteQuery();
}
spItem.DeleteObject();
ClientContext.ExecuteQuery();
}
}
}
6 changes: 3 additions & 3 deletions Untech.SharePoint.Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyFileVersion("0.9.2.0")]
[assembly: AssemblyInformationalVersion("Alpha Build")]
[assembly: AssemblyVersion("0.9.3.0")]
[assembly: AssemblyFileVersion("0.9.3.0")]
[assembly: AssemblyInformationalVersion("RC - 1")]

[assembly: InternalsVisibleTo("Untech.SharePoint.Client.Test, PublicKey="+
"0024000004800000940000000602000000240000525341310004000001000100c74a375f89b379"+
Expand Down
Loading

0 comments on commit 11b2d9e

Please sign in to comment.