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


C# IFileSystem.WriteStringToFile方法代码示例

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


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

示例1: SetUp

        public void SetUp()
        {
            theSolution = new Solution
            {
                Directory = "SolutionFiles"
            };

            theFileSystem = new FileSystem();
            theFileSystem.CreateDirectory("SolutionFiles");

            theSolutionFiles = new SolutionFiles(theFileSystem, new SolutionLoader());
            theSolutionFiles.RootDir = Path.GetTempPath().AppendRandomPath();

            theFileSystem.CreateDirectory("SolutionFiles", "src");

            theFileSystem.CreateDirectory("SolutionFiles", "src", "Project1");
            theFileSystem.CreateDirectory("SolutionFiles", "src", "Project2");

            theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project1", "Project1.csproj"), "test");
            theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project2", "Project2.csproj"), "test");
        }
开发者ID:4lexm,项目名称:ripple,代码行数:21,代码来源:SolutionFilesTester.cs

示例2: SetUp

        public void SetUp()
        {
            theSolution = new Solution
            {
                Directory = "SolutionFiles"
            };

            theFileSystem = new FileSystem();
            theFileSystem.CreateDirectory("SolutionFiles");

            theSolutionFiles = new SolutionFiles(theFileSystem, new SolutionLoader());
            theSolutionFiles.RootDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SolutionFiles");

            theFileSystem.CreateDirectory("SolutionFiles", "src");

            theFileSystem.CreateDirectory("SolutionFiles", "src", "Project1");
            theFileSystem.CreateDirectory("SolutionFiles", "src", "Project2");

            theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project1", "Project1.csproj"), "test");
            theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project2", "Project2.csproj"), "test");
        }
开发者ID:ventaur,项目名称:ripple,代码行数:21,代码来源:SolutionFilesTester.cs

示例3: SolutionExpression

            public SolutionExpression(ISolutionGraphScenarioBuilder builder, string name)
            {
                _fileSystem = new FileSystem();

                var solutionDir = Path.Combine(builder.Directory, name);
                _fileSystem.CreateDirectory(solutionDir);

                var solutionFile = Path.Combine(solutionDir, SolutionFiles.ConfigFile);
                _fileSystem.WriteStringToFile(solutionFile, "");

                _solution = new Solution
                {
                    Name = name,
                    Path = solutionFile
                };

                _solution.Directory = solutionDir;
                _solution.SourceFolder = Path.Combine(solutionDir, "src");
                _solution.NugetSpecFolder = Path.Combine(solutionDir, "packaging", "nuget");

                _fileSystem.CreateDirectory(_solution.SourceFolder);

                builder.AddSolution(_solution);

                _builder = builder;

                _projects = new Cache<string, Project>(createAndAddProject);

                addDefaultProject();
            }
开发者ID:bobpace,项目名称:ripple,代码行数:30,代码来源:SolutionGraphScenario.cs


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