简体   繁体   English

什么是ClientRuntimeContext.Load方法正在做什么

[英]What is exactly ClientRuntimeContext.Load Method doing

我是CSOM SharePoint的新手,我想知道是否有人可以解释ClientRuntimeContext.LoadClientRuntimeContext.ExecuteQuery之间的差异以及何时应该使用它们中的任何一个?

clientcontext.load loads the context with items that need to be fetched from the server. clientcontext.load使用需要从服务器获取的项加载上下文。 You can think of this as loading a magazine or a hopper. 您可以将其视为装载杂志或料斗。 Usually it's required to load items that are associated with a fetch method, not a property 通常需要加载与fetch方法关联的项目,而不是属性

clientcontext.executequery will actually perform the fetch. clientcontext.executequery实际上将执行提取。 You can think of this as pulling the trigger to fetch all the "loaded" items. 您可以将此视为拉动触发器以获取所有“已加载”的项目。

You can learn more about these methods on the MSDN page here 您可以在此处的MSDN页面上了解有关这些方法的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM