Click or drag to resize
RepositoryLocationsCollectionClone Method (FuncString, String)
Creates a new object that is a copy of the current instance using locationTransform function.

Namespace: CMS.ContinuousIntegration.Internal
Assembly: CMS.ContinuousIntegration (in CMS.ContinuousIntegration.dll) Version: 12.0.0
Syntax
C#
public Object Clone(
	Func<string, string> locationTransform
)

Parameters

locationTransform
Type: SystemFuncString, String
Transformation function for location.

Return Value

Type: Object
A new object that is a copy of this instance.
Examples
This code shows how to transform relative locations into absolute using Clone(FuncString, String) method.
// Obtain repository configuration
FileSystemRepositoryConfiguration configuration = FileSystemRepositoryConfigurationBuilder.Build();

// Store relative paths for objects
RepositoryLocationsCollection relativeLocations = new RepositoryLocationsCollection();
/*...*/

// Obtain absolute paths from the relative ones
RepositoryLocationsCollection absoluteLocations = relativeLocations.Close(relativePath => Path.Combine(configuration.RepositoryRootPath, relativePath));
See Also