コード例 #1
0
ファイル: BuildService.cs プロジェクト: powerinbox/hudson.net
        /// <summary>
        /// Gets the build.
        /// </summary>
        /// <param name="buildDescriptor">The build descriptor.</param>
        /// <returns></returns>
        public Build GetBuild(BuildDescriptor buildDescriptor)
        {
            Build build = new NullBuild(buildDescriptor);

            var url = new XmlApiPrepender().Prepend(build.Url);

            if (buildDescriptor != null)
            {
                var xml = XmlService.GetPage(url);

                if (xml.IsValid)
                {
                    build = new BuildMapper().Map(xml.Contents);
                }
            }

            return build;
        }
コード例 #2
0
 public void SetUp()
 {
     mapper = new BuildMapper();
 }