public void Load(ClientObject clientObject, LoadOption loadOption)
        {
            Utility.ValidateContext(this, clientObject);

            if (loadOption == null)
            {
                loadOption = new LoadOption();
            }

            QueryInfo queryOption = new QueryInfo();

            if (!string.IsNullOrEmpty(loadOption.Select))
            {
                queryOption.Select = this.ParseSelectExpand(loadOption.Select);
            }

            if (!string.IsNullOrEmpty(loadOption.Expand))
            {
                queryOption.Expand = this.ParseSelectExpand(loadOption.Expand);
            }

            queryOption.Skip = loadOption.Skip;
            queryOption.Top  = loadOption.Top;

            var action = ActionFactory.CreateQueryAction(this, clientObject, queryOption);

            this._PendingRequest.AddActionResultHandler(action, clientObject);
        }
Exemple #2
0
 public static void _Load(ClientObject clientObject, LoadOption loadOption)
 {
     clientObject.Context.Load(clientObject, loadOption);
 }