AL.Sharepoint.Core.Utils.SPUtils.ElevatedListOp C# (CSharp) Method

ElevatedListOp() public static method

public static ElevatedListOp ( string webUrl, string listName, Action op ) : void
webUrl string
listName string
op Action
return void
        public static void ElevatedListOp(string webUrl, string listName, Action<SPList> op)
        {
            WebOpElevated(webUrl, web =>
            {
                SPList list = web.Lists[listName];
                if (list == null)
                    throw new ApplicationException(string.Format("List '{0}' cannot be found in '{1}' web", listName,
                                                                 webUrl));
                op(list);
            });
        }