void AddPackage(string name, string version, string[] descriptorLines) { var packageFile = Packager.NewWithDescriptor(file_system.CreateTempFile(), name, version, descriptorLines); using (var publisher = (IPackagePublisherWithSource)repository.Publisher()) using (var packageFileStream = packageFile.OpenRead()) { publisher.Publish(source_repository, name + "-" + version + ".wrap", packageFileStream); } }