本文整理汇总了C#中DeploymentResult.Add方法的典型用法代码示例。如果您正苦于以下问题:C# DeploymentResult.Add方法的具体用法?C# DeploymentResult.Add怎么用?C# DeploymentResult.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeploymentResult
的用法示例。
在下文中一共展示了DeploymentResult.Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessRemoteQueue
void ProcessRemoteQueue(DeploymentResult result)
{
VerifyInAdministratorRole(result);
Logging.Coarse("[msmq][remote] Setting permission for '{0}' on remote queue '{1}'.", _group, _address.ActualUri);
using (var remote = new RemoteDropkickExecutionTask(_server))
{
//capture output
var vresult = remote.GrantMsmqPermission(QueuePermission.Write, _address, _group);
foreach (var r in vresult) result.Add(r);
}
}
示例2: Execute
public override DeploymentResult Execute()
{
var result = new DeploymentResult();
using (var iisManager = ServerManager.OpenRemote(ServerName))
{
var site = iisManager.Sites[SiteName];
if (site == null)
result.AddNote(siteDoesNotExist);
else
{
checkForElevatedPrivileges(() => Operation.Action(site));
iisManager.CommitChanges();
result.Add(new DeploymentItem(Operation.ReportingLevel, "Site operation '{0}' executed on '{1}'".FormatWith(Operation.Name, SiteName)));
}
}
return result;
}
示例3: ProcessRemoteQueue
void ProcessRemoteQueue(DeploymentResult result)
{
VerifyInAdministratorRole(result);
Logging.Coarse("[msmq][remote] Setting default permissions on remote queue '{0}'.", _address.ActualUri);
using (var remote = new RemoteDropkickExecutionTask(_server))
{
var vresult = remote.GrantMsmqPermission(QueuePermission.SetSensibleDefaults, _address, WellKnownSecurityRoles.Administrators);
foreach (var r in vresult) result.Add(r);
}
}
示例4: ExecuteRemoteTask
public void ExecuteRemoteTask(DeploymentResult result)
{
LogSecurity("[remote][security][cert] Granting READ to X509 Certificate's private key for thumbprint '{0}' on '{1}'.", _thumbprint,_server.Name);
using (var remote = new RemoteDropkickExecutionTask(_server))
{
StringBuilder sentGroups = new StringBuilder();
sentGroups.Append("|");
foreach (string group in _groups)
{
sentGroups.Append("{0}|".FormatWith(group));
}
var vresult = remote.GrantReadCertificatePrivateKey(sentGroups.ToString(), _thumbprint, _storeName.ToString(), _storeLocation.ToString());
foreach (var r in vresult) result.Add(r);
}
}