作者ninepoints (不要叫我大大)
看板C_Sharp
标题[问题] delegate在powershell里要怎麽用?
时间Mon Sep 27 21:55:38 2010
不知道有没有走错版,
这个问题跟powershell, sharepoint比较相关。
是这样的,我之前用C#写sharepoint 的 Event Receiver时,
常常会用到这种写法
SPSecurity.RunWithElevatedPrivileges(delegate()
{
// do things assuming the permission of the "system account"
});
不过最近开始改用powershell写Event Receiver,
(
http://cglessner.blogspot.com/2008/12/sharepoint-power-event-receiver-20.html
)
发现没办法"sudo"做一些高权限的事情,
我去问这个plug-in的原作者,
可是他提供的语法过不了,
想请问上面那种C#扣有没有可能用powershell写呢?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 211.22.63.250