本文整理汇总了C#中IProjectSpecifier类的典型用法代码示例。如果您正苦于以下问题:C# IProjectSpecifier类的具体用法?C# IProjectSpecifier怎么用?C# IProjectSpecifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IProjectSpecifier类属于命名空间,在下文中一共展示了IProjectSpecifier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProjectLink
public ProjectLink(ICruiseUrlBuilder urlBuilder, IProjectSpecifier projectSpecifier, string text, string action)
: base (text)
{
this.urlBuilder = urlBuilder;
this.action = action;
this.buildSpecifier = projectSpecifier;
}
示例2: ForceBuild
public bool ForceBuild(IProjectSpecifier projectSpecifier)
{
bool clientInfoRequired = false;
ArrayList clientInfoList = new ArrayList();
ICruiseManager manager = GetCruiseManager(projectSpecifier.ServerSpecifier);
IForceFilter[] forceFilters = this.GetProject(manager, projectSpecifier.ProjectName).ForceFilters;
if (forceFilters != null && forceFilters.Length != 0)
{
foreach (IForceFilter forceFilter in forceFilters)
{
if (forceFilter.RequiresClientInformation)
{
clientInfoRequired = true;
ForceFilterClientInfo info = forceFilter.GetClientInfo();
clientInfoList.Add(info);
}
}
}
if (clientInfoRequired)
{
ForceFilterClientInfo[] clientInfo;
clientInfo = (ForceFilterClientInfo[]) clientInfoList.ToArray(typeof(ForceFilterClientInfo));
return manager.ForceBuild(projectSpecifier.ProjectName, clientInfo);
}
else
{
return manager.ForceBuild(projectSpecifier.ProjectName);
}
}
示例3: BuildProjectUrl
/// <summary>
/// Builds the project URL.
/// </summary>
/// <param name="action">The action.</param>
/// <param name="projectSpecifier">The project specifier.</param>
/// <returns></returns>
/// <remarks></remarks>
public string BuildProjectUrl(string action, IProjectSpecifier projectSpecifier)
{
return urlBuilder.BuildUrl(
action,
string.Empty,
GeneratePath(projectSpecifier.ServerSpecifier.ServerName, projectSpecifier.ProjectName, string.Empty));
}
示例4: DiagnoseSecurityPermissions
/// <summary>
/// Checks the security permissions for a user for a project.
/// </summary>
/// <param name="projectSpecifier">The project to check.</param>
/// <param name="userName">The name of the user.</param>
/// <param name="sessionToken"></param>
/// <returns>A set of diagnostics information.</returns>
public virtual List<SecurityCheckDiagnostics> DiagnoseSecurityPermissions(IProjectSpecifier projectSpecifier, string sessionToken, string userName)
{
var response = GetCruiseManager(projectSpecifier, sessionToken)
.DiagnoseSecurityPermissions(userName, new string[] {
projectSpecifier.ProjectName
});
return response;
}
示例5: CreateBuildSpecifiers
private IBuildSpecifier[] CreateBuildSpecifiers(IProjectSpecifier projectSpecifier, string[] buildNames)
{
var buildSpecifiers = new List<IBuildSpecifier>();
foreach (string buildName in buildNames)
{
buildSpecifiers.Add(new DefaultBuildSpecifier(projectSpecifier, buildName));
}
return buildSpecifiers.ToArray();
}
示例6: GetProjectPluginLinks
public IAbsoluteLink[] GetProjectPluginLinks(IProjectSpecifier projectSpecifier)
{
ArrayList links = new ArrayList();
foreach (IPlugin plugin in pluginConfiguration.ProjectPlugins)
{
links.Add(LinkFactory.CreateProjectLink(projectSpecifier, plugin.LinkDescription, plugin.NamedActions[0].ActionName));
}
return (IAbsoluteLink[]) links.ToArray(typeof (IAbsoluteLink));
}
示例7: DeleteProjectModel
public DeleteProjectModel(IProjectSpecifier projectSpecifier, string message, bool allowDelete,
bool purgeWorkingDirectory, bool purgeArtifactDirectory, bool purgeSourceControlEnvironment)
{
this.message = message;
this.allowDelete = allowDelete;
this.purgeSourceControlEnvironment = purgeSourceControlEnvironment;
this.purgeArtifactDirectory = purgeArtifactDirectory;
this.purgeWorkingDirectory = purgeWorkingDirectory;
this.projectSpecifier = projectSpecifier;
}
示例8: GenerateAllBuildsView
public HtmlFragmentResponse GenerateAllBuildsView(IProjectSpecifier projectSpecifier, string sessionToken)
{
Hashtable primaryContext = new Hashtable();
Hashtable secondaryContext = new Hashtable();
secondaryContext["links"] = linkListFactory.CreateStyledBuildLinkList(farmService.GetBuildSpecifiers(projectSpecifier, sessionToken), BuildReportBuildPlugin.ACTION_NAME);
primaryContext["buildRows"] = velocityTransformer.Transform(@"BuildRows.vm", secondaryContext);
primaryContext["allBuildsLink"] = linkFactory.CreateProjectLink(projectSpecifier, string.Empty, ViewAllBuildsProjectPlugin.ACTION_NAME);
return velocityViewGenerator.GenerateView(@"AllBuilds.vm", primaryContext);
}
示例9: DefaultBuildSpecifier
public DefaultBuildSpecifier(IProjectSpecifier projectSpecifier, string buildName)
{
if (projectSpecifier == null)
{
throw new CruiseControlException("Build Specifier cannot be instantiated with a null Project Specifier");
}
if (buildName == null)
{
throw new CruiseControlException("Build Specifier cannot be instantiated with a null build name");
}
if (buildName == string.Empty)
{
throw new CruiseControlException("Build Specifier cannot be instantiated with an empty build name");
}
this.projectSpecifier = projectSpecifier;
this.buildName = buildName;
}
示例10: IsDisplayedForProject
public bool IsDisplayedForProject(IProjectSpecifier project)
{
string projectName = project.ProjectName;
if (includedProjects.Count > 0)
{
return includedProjects.Contains(project.ProjectName);
}
else if (excludedProjects.Count > 0)
{
return !excludedProjects.Contains(projectName);
}
else
{
return true;
}
}
示例11: BuildRecentBuildsTable
// ToDo - use concatenatable views here, not strings
// ToDo - something better for errors
public string BuildRecentBuildsTable(IProjectSpecifier projectSpecifier)
{
Hashtable primaryContext = new Hashtable();
Hashtable secondaryContext = new Hashtable();
try
{
secondaryContext["links"] = linkListFactory.CreateStyledBuildLinkList(farmService.GetMostRecentBuildSpecifiers(projectSpecifier, 10), BuildReportBuildPlugin.ACTION_NAME);
primaryContext["buildRows"] = velocityTransformer.Transform(@"BuildRows.vm", secondaryContext);
primaryContext["allBuildsLink"] = linkFactory.CreateProjectLink(projectSpecifier, "", ViewAllBuildsProjectPlugin.ACTION_NAME);
return velocityTransformer.Transform(@"RecentBuilds.vm", primaryContext);
}
catch (Exception)
{
// Assume exception also caught where we care about (i.e. by action)
return "";
}
}
示例12: CreateRSSLink
public static GeneralAbsoluteLink CreateRSSLink(ILinkFactory linkFactory, IProjectSpecifier projectSpecifier)
{
string MachineName;
if (System.Web.HttpContext.Current == null )
{
MachineName = "localhost";
}
else
{
MachineName = System.Web.HttpContext.Current.Request.Url.Host;
if (!System.Web.HttpContext.Current.Request.Url.IsDefaultPort)
MachineName = MachineName + ":" + System.Web.HttpContext.Current.Request.Url.Port;
}
return new GeneralAbsoluteLink("RSS",string.Format(System.Globalization.CultureInfo.CurrentCulture,"http://{0}{1}",
MachineName,
linkFactory.CreateProjectLink(projectSpecifier, WebDashboard.Plugins.RSS.RSSFeed.ACTION_NAME).Url));
}
示例13: GetCruiseManager
private CruiseServerClientBase GetCruiseManager(IProjectSpecifier projectSpecifier, string sessionToken)
{
return GetCruiseManager(projectSpecifier.ServerSpecifier, sessionToken);
}
示例14: BuildRecentBuildsTable
// ToDo - use concatenatable views here, not strings
// ToDo - something better for errors
public string BuildRecentBuildsTable(IProjectSpecifier projectSpecifier, string sessionToken)
{
return BuildRecentBuildsTable(projectSpecifier, null, sessionToken);
}
示例15: Setup
public void Setup()
{
urlBuilderMock = new DynamicMock(typeof (IUrlBuilder));
serverSpecifier = new DefaultServerSpecifier("myserver");
projectSpecifier = new DefaultProjectSpecifier(serverSpecifier, "myproject");
buildSpecifier = new DefaultBuildSpecifier(projectSpecifier, "mybuild");
cruiseUrlBuilder = new DefaultCruiseUrlBuilder((IUrlBuilder) urlBuilderMock.MockInstance);
}