void WriteVersionFile(IDirectory projectDirectory) { using (Stream versionFile = projectDirectory.GetFile("version").OpenWrite()) { StreamExtensions.Write(versionFile, Encoding.UTF8.GetBytes(("0.0.1.*"))); } }
protected void given_configuration_text(Uri configurationUri, string textValue) { // add file to virtual file system by getting relative URI var relativeUri = Configurations.Addresses.BaseUri.MakeRelativeUri(configurationUri).ToString(); var file = ConfigurationDirectory.GetFile(relativeUri); using (var fs = file.OpenWrite()) StreamExtensions.Write(fs, Encoding.UTF8.GetBytes(textValue)); }