当前位置: 首页>>代码示例>>C#>>正文


C# IParameters.Default方法代码示例

本文整理汇总了C#中IParameters.Default方法的典型用法代码示例。如果您正苦于以下问题:C# IParameters.Default方法的具体用法?C# IParameters.Default怎么用?C# IParameters.Default使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IParameters的用法示例。


在下文中一共展示了IParameters.Default方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTargets

        public static object GetTargets(IParameters parameters)
        {
            var git = new GitCheckout {
                Repository = @"C:\Users\Public\Documents\Development\BigSolution.git",
                Directory = "one"
            };
            var solution = new VisualStudioSolution {
                SolutionPath = git.Files["BigSolution.sln"]
            };
            var webProject = solution.Projects[parameters.Default("proj", "BigSolution")];
            var serviceName = parameters.Default("svc", "BigWindowsService");
            var service = solution.Projects[serviceName];

            return new {
                WebSite = new Iis7WebSite {
                    Directory = webProject.ProjectDirectory,
                    Name = "BigWebSite",
                    Port = 5001
                },
                Tests = new NUnitTests {
                    DllPaths = solution.Projects.Select(p => p.OutputFile)
                },
                Service = new WindowsService {
                    BinaryPath = service.OutputFile,
                    Name = serviceName,
                    DisplayName = "Big Windows Service",
                    Description = "a big windows service demonstrating the bounce build framework"
                },
                Zip = new ZipFile {
                    Directory = webProject.WhenBuilt(() => Path.GetDirectoryName(webProject.OutputFile.Value)),
                    ZipFileName = "web.zip"
                },
            };
        }
开发者ID:svoruganti,项目名称:bounce,代码行数:34,代码来源:BuildTargets.cs

示例2: GetTargets

            public static object GetTargets(IParameters parameters) {
                var one = new FakeTask {Dependencies = new [] {new TaskDependency (parameters.Required<int>("port"))}};
                var two = new FakeTask {Dependencies = new [] {new TaskDependency (parameters.Default("name", "Some Web Site"))}};

                return new {
                    One = one,
                    Two = two,
                };
            }
开发者ID:nbucket,项目名称:bounce,代码行数:9,代码来源:ShowingAvailableTargetsAndParametersFeature.cs

示例3: Targets

        public static object Targets(IParameters parameters)
        {
            var solution = new VisualStudioSolution {
                SolutionPath = "WebSolution.sln",
            };
            var webProject = solution.Projects["WebSite"];

            return new {
                WebSite = new Iis7WebSite {
                    Directory = webProject.ProjectDirectory,
                    Name = "My Website",
                    Port = parameters.Default("port", 5001),
                },
                Tests = new NUnitTests {
                    DllPaths = solution.Projects.Select(p => p.OutputFile),
                },
            };
        }
开发者ID:svoruganti,项目名称:bounce,代码行数:18,代码来源:BuildTargets.cs

示例4: GetTargets

        public static object GetTargets(IParameters parameters)
        {
            var stage = parameters.Default("stage", "packageDeploy");

            var solution = new VisualStudioSolution {SolutionPath = "Solution.sln"};

            var machines = new[] {
            new DeployMachine {
                LocalPath = @"c:\Deployments",
                Machine = "liveserver1",
                RemotePath = @"\\liveserver1\Deployments"
            },
            new DeployMachine {
                LocalPath = @"c:\Deployments",
                Machine = "liveserver2",
                RemotePath = @"\\liveserver2\Deployments"
            }
            };

            var targets = new StagedDeployTargetBuilder(stage);
            var website = targets.CreateTarget("WebSite");

            website.Package = new Copy {
            FromPath = solution.Projects["WebSite"].ProjectDirectory,
            ToPath = new CleanDirectory {Path = "package"}.Path.SubPath("WebSite")
            }.ToPath;

            website.InvokeRemoteDeploy = website.CopyToAndInvokeOnMachines(machines, new SubBounceFactory());

            website.Deploy = package => new Iis7WebSite {
            Directory = new Copy {
                FromPath = package.SubPath("WebSite"),
                ToPath = @"C:\Sites\WebSite"
            }.ToPath,
            Name = "WebSite"
            };

            return targets.Targets;
        }
开发者ID:haos11,项目名称:bounce,代码行数:39,代码来源:BuildTargets.cs


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