Exemplo n.º 1
0
 protected void FillClone(ProjectRestoreMetadata clone)
 {
     clone.ProjectStyle             = ProjectStyle;
     clone.ProjectPath              = ProjectPath;
     clone.ProjectJsonPath          = ProjectJsonPath;
     clone.OutputPath               = OutputPath;
     clone.ProjectName              = ProjectName;
     clone.ProjectUniqueName        = ProjectUniqueName;
     clone.PackagesPath             = PackagesPath;
     clone.CacheFilePath            = CacheFilePath;
     clone.CrossTargeting           = CrossTargeting;
     clone.LegacyPackagesDirectory  = LegacyPackagesDirectory;
     clone.SkipContentFileWrite     = SkipContentFileWrite;
     clone.ValidateRuntimeAssets    = ValidateRuntimeAssets;
     clone.FallbackFolders          = FallbackFolders != null ? new List <string>(FallbackFolders) : null;
     clone.ConfigFilePaths          = ConfigFilePaths != null ? new List <string>(ConfigFilePaths) : null;
     clone.OriginalTargetFrameworks = OriginalTargetFrameworks != null ? new List <string>(OriginalTargetFrameworks) : null;
     clone.Sources                                = Sources?.Select(c => c.Clone()).ToList();
     clone.TargetFrameworks                       = TargetFrameworks?.Select(c => c.Clone()).ToList();
     clone.Files                                  = Files?.Select(c => c.Clone()).ToList();
     clone.ProjectWideWarningProperties           = ProjectWideWarningProperties?.Clone();
     clone.RestoreLockProperties                  = RestoreLockProperties?.Clone();
     clone.CentralPackageVersionsEnabled          = CentralPackageVersionsEnabled;
     clone.CentralPackageVersionOverrideDisabled  = CentralPackageVersionOverrideDisabled;
     clone.CentralPackageTransitivePinningEnabled = CentralPackageTransitivePinningEnabled;
 }
Exemplo n.º 2
0
 public ProjectRestoreMetadata Clone()
 {
     return(new ProjectRestoreMetadata
     {
         ProjectStyle = ProjectStyle,
         ProjectPath = ProjectPath,
         ProjectJsonPath = ProjectJsonPath,
         OutputPath = OutputPath,
         ProjectName = ProjectName,
         ProjectUniqueName = ProjectUniqueName,
         PackagesPath = PackagesPath,
         CacheFilePath = CacheFilePath,
         CrossTargeting = CrossTargeting,
         LegacyPackagesDirectory = LegacyPackagesDirectory,
         SkipContentFileWrite = SkipContentFileWrite,
         ValidateRuntimeAssets = ValidateRuntimeAssets,
         FallbackFolders = FallbackFolders != null ? new List <string>(FallbackFolders) : null,
         ConfigFilePaths = ConfigFilePaths != null ? new List <string>(ConfigFilePaths) : null,
         OriginalTargetFrameworks = OriginalTargetFrameworks != null ? new List <string>(OriginalTargetFrameworks) : null,
         Sources = Sources?.Select(c => c.Clone()).ToList(),
         TargetFrameworks = TargetFrameworks?.Select(c => c.Clone()).ToList(),
         Files = Files?.Select(c => c.Clone()).ToList(),
         ProjectWideWarningProperties = ProjectWideWarningProperties?.Clone(),
         RestoreLockProperties = RestoreLockProperties?.Clone()
     });
 }