• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Messages.ProjectRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ThoughtWorks.CruiseControl.Remote.Messages.ProjectRequest的典型用法代码示例。如果您正苦于以下问题:C# ProjectRequest类的具体用法?C# ProjectRequest怎么用?C# ProjectRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProjectRequest类属于ThoughtWorks.CruiseControl.Remote.Messages命名空间,在下文中一共展示了ProjectRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InitialiseRequestWithSessionSetsTheCorrectValues

 public void InitialiseRequestWithSessionSetsTheCorrectValues()
 {
     string sessionToken = "the session";
     DateTime now = DateTime.Now;
     ProjectRequest request = new ProjectRequest(sessionToken);
     Assert.IsFalse(string.IsNullOrEmpty(request.Identifier), "Identifier was not set");
     Assert.AreEqual(Environment.MachineName, request.SourceName, "Source name doesn't match the machine name");
     Assert.AreEqual(sessionToken, request.SessionToken, "SessionToken doesn't match the input token");
     Assert.IsTrue((now <= request.Timestamp), "Timestamp was not set");
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:10,代码来源:ProjectRequestTests.cs


示例2: ToStringSerialisesDefaultValues

 public void ToStringSerialisesDefaultValues()
 {
     ProjectRequest request = new ProjectRequest();
     string actual = request.ToString();
     string expected = string.Format(System.Globalization.CultureInfo.CurrentCulture,"<projectMessage xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +
         "timestamp=\"{2:yyyy-MM-ddTHH:mm:ss.FFFFFFFzzz}\" identifier=\"{0}\" source=\"{1}\" />",
         request.Identifier,
         request.SourceName,
         request.Timestamp);
     Assert.AreEqual(expected, actual);
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:11,代码来源:ProjectRequestTests.cs


示例3: buildProject

        private void buildProject()
        {
            this._manager = new RemoteCruiseManagerFactory()
                .GetCruiseServerClient("tcp://localhost:21234/CruiseManager.rem");
            this._project = new ProjectRequest("Edd", this.Name);
            this._manager.ForceBuild(this._project);
            this._request = new ServerRequest(this._project.SessionToken);

            // Write current status
            this.progress(String.Empty);
            IsRunning = false;
            Console.Write("\n\n");
        }
开发者ID:redheat,项目名称:vx-deployment,代码行数:13,代码来源:VxBuild.cs


示例4: ProcessMessageCorrectlyHandlesAnUnknownAction

        public void ProcessMessageCorrectlyHandlesAnUnknownAction()
        {
            // Setup the messages
            ProjectRequest request = new ProjectRequest("123-45", "A test project");

            // Initialises the mocks
            ICruiseServer server = mocks.DynamicMock<ICruiseServer>();
            mocks.ReplayAll();

            // Run the actual test
            var manager = new ThoughtWorks.CruiseControl.Core.CruiseServerClient(server);
            string responseText = manager.ProcessMessage("UnknownAction", request.ToString());
            Response response = ConvertXmlToResponse(responseText);
            Assert.AreEqual(ResponseResult.Failure, response.Result, "Result is unexpected");
        }
开发者ID:kyght,项目名称:CruiseControl.NET,代码行数:15,代码来源:CruiseServerClientTests.cs


示例5: ProcessMessageCorrectlyHandlesAValidMessage

        public void ProcessMessageCorrectlyHandlesAValidMessage()
        {
            // Setup the messages
            ProjectRequest request = new ProjectRequest("123-45", "A test project");
            Response response = new Response(request);
            response.Result = ResponseResult.Success;

            // Initialises the mocks
            ICruiseServer server = mocks.DynamicMock<ICruiseServer>();
            Expect.Call(server.ForceBuild(request)).Return(response);
            mocks.ReplayAll();

            // Run the actual test
            var manager = new ThoughtWorks.CruiseControl.Core.CruiseServerClient(server);
            string responseText = manager.ProcessMessage("ForceBuild", request.ToString());
            Assert.AreEqual(response.ToString(), responseText);
            mocks.VerifyAll();
        }
开发者ID:kyght,项目名称:CruiseControl.NET,代码行数:18,代码来源:CruiseServerClientTests.cs


示例6: ToStringSerialisesAllValues

 public void ToStringSerialisesAllValues()
 {
     ProjectRequest request = new ProjectRequest();
     request.Identifier = "identifier";
     request.ProjectName = "projectName";
     request.ServerName = "serverName";
     request.SessionToken = "sessionToken";
     request.SourceName = "sourceName";
     request.Timestamp = DateTime.Now;
     string actual = request.ToString();
     string expected = string.Format(System.Globalization.CultureInfo.CurrentCulture,"<projectMessage xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +
         "timestamp=\"{4:yyyy-MM-ddTHH:mm:ss.FFFFFFFzzz}\" identifier=\"{0}\" server=\"{1}\" source=\"{2}\" session=\"{3}\" project=\"{5}\" />",
         request.Identifier,
         request.ServerName,
         request.SourceName,
         request.SessionToken,
         request.Timestamp,
         request.ProjectName);
     Assert.AreEqual(expected, actual);
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:20,代码来源:ProjectRequestTests.cs


示例7: ForceBuild

 /// <summary>
 /// Forces a build for the named project.
 /// </summary>
 /// <param name="request">A <see cref="ProjectRequest"/> containing the request details.</param>
 /// <returns>A <see cref="Response"/> containing the results of the request.</returns>
 public Response ForceBuild(ProjectRequest request)
 {
     return cruiseServer.ForceBuild(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:9,代码来源:CruiseServerClient.cs


示例8: RetrievePackageList

 /// <summary>
 /// Retrieves a list of packages for a project.
 /// </summary>
 public virtual ListPackagesResponse RetrievePackageList(ProjectRequest request)
 {
     return cruiseServer.RetrievePackageList(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:7,代码来源:CruiseServerClient.cs


示例9: ListBuildParameters

 /// <summary>
 /// Lists the build parameters for a project.
 /// </summary>
 /// <param name="request">The project to retrieve the parameters for.</param>
 /// <returns>The list of parameters (if any).</returns>
 public BuildParametersResponse ListBuildParameters(ProjectRequest request)
 {
     return cruiseServer.ListBuildParameters(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:9,代码来源:CruiseServerClient.cs


示例10: GetModificationHistoryDocument

 /// <summary>
 /// Gets the modification history document.	
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public virtual DataResponse GetModificationHistoryDocument(ProjectRequest request)
 {
     return cruiseServer.GetModificationHistoryDocument(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:10,代码来源:CruiseServerClient.cs


示例11: GetArtifactDirectory

 /// <summary>
 /// Gets the artifact directory.	
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public virtual DataResponse GetArtifactDirectory(ProjectRequest request)
 {
     return cruiseServer.GetArtifactDirectory(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:10,代码来源:CruiseServerClient.cs


示例12: GetBuildNames

 /// <summary>
 /// Returns the names of all builds for the specified project, sorted s.t. the newest build is first in the array
 /// </summary>
 public virtual DataListResponse GetBuildNames(ProjectRequest request)
 {
     return cruiseServer.GetBuildNames(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:7,代码来源:CruiseServerClient.cs


示例13: GetProject

 /// <summary>
 /// Gets the project.	
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public DataResponse GetProject(ProjectRequest request)
 {
     string data = null;
     DataResponse response = new DataResponse(RunProjectRequest(request,
         SecurityPermission.ViewConfiguration,
         null,
         delegate(ProjectRequest arg, Response resp)
         {
             Log.Info("Getting project - " + request.ProjectName);
             data = new NetReflectorProjectSerializer()
                 .Serialize(configurationService.Load().Projects[arg.ProjectName]);
         }));
     response.Data = data;
     return response;
 }
开发者ID:csut017,项目名称:CruiseControl.NET,代码行数:21,代码来源:CruiseServer.cs


示例14: GetBuildNames

 /// <summary>
 /// Returns the names of all builds for the specified project, sorted s.t. the newest build is first in the array
 /// </summary>
 public DataListResponse GetBuildNames(ProjectRequest request)
 {
     List<string> data = new List<string>();
     DataListResponse response = new DataListResponse(RunProjectRequest(request,
         SecurityPermission.ViewProject,
         null,
         delegate(ProjectRequest arg, Response resp)
         {
             data.AddRange(GetIntegrator(arg.ProjectName).
                 IntegrationRepository.
                 GetBuildNames());
         }));
     response.Data = data;
     return response;
 }
开发者ID:csut017,项目名称:CruiseControl.NET,代码行数:18,代码来源:CruiseServer.cs


示例15: GetLatestBuildName

 /// <summary>
 /// Returns the name of the most recent build for the specified project
 /// </summary>
 public DataResponse GetLatestBuildName(ProjectRequest request)
 {
     string data = null;
     DataResponse response = new DataResponse(RunProjectRequest(request,
         SecurityPermission.ViewProject,
         null,
         delegate(ProjectRequest arg, Response resp)
         {
             data = GetIntegrator(arg.ProjectName).IntegrationRepository.GetLatestBuildName();
         }));
     response.Data = data;
     return response;
 }
开发者ID:csut017,项目名称:CruiseControl.NET,代码行数:16,代码来源:CruiseServer.cs


示例16: WaitForExit

 /// <summary>
 /// Waits for the project to exit.
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public virtual Response WaitForExit(ProjectRequest request)
 {
     return cruiseServer.WaitForExit(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:9,代码来源:CruiseServerClient.cs


示例17: GetLatestBuildName

 /// <summary>
 /// Returns the name of the most recent build for the specified project
 /// </summary>
 public virtual DataResponse GetLatestBuildName(ProjectRequest request)
 {
     return cruiseServer.GetLatestBuildName(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:7,代码来源:CruiseServerClient.cs


示例18: GetExternalLinks

 /// <summary>
 /// Gets the external links.	
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public ExternalLinksListResponse GetExternalLinks(ProjectRequest request)
 {
     List<ExternalLink> data = new List<ExternalLink>();
     ExternalLinksListResponse response = new ExternalLinksListResponse(RunProjectRequest(request,
         SecurityPermission.ViewProject,
         null,
         delegate(ProjectRequest arg, Response resp)
         {
             data.AddRange(LookupProject(arg.ProjectName).ExternalLinks);
         }));
     response.ExternalLinks = data;
     return response;
 }
开发者ID:csut017,项目名称:CruiseControl.NET,代码行数:19,代码来源:CruiseServer.cs


示例19: GetExternalLinks

 /// <summary>
 /// Gets the external links.	
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public virtual ExternalLinksListResponse GetExternalLinks(ProjectRequest request)
 {
     return cruiseServer.GetExternalLinks(request);
 }
开发者ID:bkr765,项目名称:CruiseControl.NET,代码行数:10,代码来源:CruiseServerClient.cs


示例20: GetModificationHistoryDocument

 /// <summary>
 /// Gets the modification history document.	
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public DataResponse GetModificationHistoryDocument(ProjectRequest request)
 {
     string data = null;
     DataResponse response = new DataResponse(RunProjectRequest(request,
         SecurityPermission.ViewProject,
         null,
         delegate(ProjectRequest arg, Response resp)
         {
             data = GetIntegrator(arg.ProjectName).Project.ModificationHistory;
         }));
     response.Data = data;
     return response;
 }
开发者ID:csut017,项目名称:CruiseControl.NET,代码行数:19,代码来源:CruiseServer.cs



注:本文中的ThoughtWorks.CruiseControl.Remote.Messages.ProjectRequest类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Messages.ServerRequest类代码示例发布时间:2022-05-26
下一篇:
C# Remote.ProjectStatus类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap