Microsoft.R.Components.PackageManager.Implementation.ViewModel.RPackageViewModel.AddDetails C# (CSharp) Method

AddDetails() public method

public AddDetails ( RPackage package, bool isInstalled ) : void
package Microsoft.R.Components.PackageManager.Model.RPackage
isInstalled bool
return void
        public void AddDetails(RPackage package, bool isInstalled) {
            Title = package.Title.NormalizeWhitespace();
            Description = package.Description.NormalizeWhitespace();
            Authors = package.Author.NormalizeWhitespace();
            Urls = package.URL?.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => s.Trim())
                .ToArray() ?? new string[0];
            LibraryPath = package.LibPath;
            Built = package.Built;

            if (isInstalled) {
                InstalledVersion = package.Version;
                IsInstalled = true;
                IsUpdateAvailable = new RPackageVersion(LatestVersion).CompareTo(new RPackageVersion(InstalledVersion)) > 0;
            }

            HasDetails = true;
        }
    }