renamed a class

This commit is contained in:
jakobdyrby
2014-05-09 14:00:07 +02:00
parent 5d3d2e9331
commit c0b22c4349
4 changed files with 18 additions and 17 deletions

View File

@@ -3,12 +3,12 @@ using Umbraco.Core.Models;
namespace Umbraco.Core.Services
{
public class PackageValidationHelper : IPackageValidationHelper
public class ConflictingPackageContentFinder : IConflictingPackageContentFinder
{
private readonly IMacroService _macroService;
private readonly IFileService _fileService;
public PackageValidationHelper(IMacroService macroService,
public ConflictingPackageContentFinder(IMacroService macroService,
IFileService fileService)
{
if (fileService != null) _fileService = fileService;

View File

@@ -2,7 +2,7 @@
namespace Umbraco.Core.Services
{
public interface IPackageValidationHelper
public interface IConflictingPackageContentFinder
{
bool StylesheetExists(string styleSheetName, out IStylesheet existingStylesheet);
bool TemplateExists(string templateAlias, out ITemplate existingTemplate);

View File

@@ -17,7 +17,7 @@ namespace Umbraco.Core.Services
private readonly IFileService _fileService;
private readonly IMacroService _macroService;
private readonly IPackagingService _packagingService;
private IPackageValidationHelper _packageValidationHelper;
private IConflictingPackageContentFinder _conflictingPackageContentFinder;
private IUnpackHelper _unpackHelper;
public PackageInstallerService(IPackagingService packagingService, IMacroService macroService,
@@ -32,20 +32,20 @@ namespace Umbraco.Core.Services
}
public IPackageValidationHelper PackageValidationHelper
public IConflictingPackageContentFinder ConflictingPackageContentFinder
{
private get
{
return _packageValidationHelper ??
(_packageValidationHelper = new PackageValidationHelper(_macroService, _fileService));
return _conflictingPackageContentFinder ??
(_conflictingPackageContentFinder = new ConflictingPackageContentFinder(_macroService, _fileService));
}
set
{
if (_packageValidationHelper != null)
if (_conflictingPackageContentFinder != null)
{
throw new PropertyConstraintException("This property allraedy have a value");
throw new PropertyConstraintException("This property already have a value");
}
_packageValidationHelper = value;
_conflictingPackageContentFinder = value;
}
}
@@ -57,7 +57,7 @@ namespace Umbraco.Core.Services
{
if (_unpackHelper != null)
{
throw new PropertyConstraintException("This property allraedy have a value");
throw new PropertyConstraintException("This property already have a value");
}
_unpackHelper = value;
}
@@ -72,7 +72,7 @@ namespace Umbraco.Core.Services
if (_fullpathToRoot != null)
{
throw new PropertyConstraintException("This property allraedy have a value");
throw new PropertyConstraintException("This property already have a value");
}
_fullpathToRoot = value;
@@ -426,7 +426,7 @@ namespace Umbraco.Core.Services
string name = xElement.Value;
IStylesheet existingStyleSheet;
if (PackageValidationHelper.StylesheetExists(name, out existingStyleSheet))
if (ConflictingPackageContentFinder.StylesheetExists(name, out existingStyleSheet))
{
// Don't know what to put in here... existing path was the best i could come up with
return existingStyleSheet;
@@ -457,7 +457,7 @@ namespace Umbraco.Core.Services
ITemplate existingTemplate;
if (PackageValidationHelper.TemplateExists(aliasStr, out existingTemplate))
if (ConflictingPackageContentFinder.TemplateExists(aliasStr, out existingTemplate))
{
return existingTemplate;
}
@@ -481,7 +481,7 @@ namespace Umbraco.Core.Services
string alias = xElement.Value;
IMacro existingMacro;
if (PackageValidationHelper.MacroExists(alias, out existingMacro))
if (ConflictingPackageContentFinder.MacroExists(alias, out existingMacro))
{
return existingMacro;
}
@@ -494,6 +494,7 @@ namespace Umbraco.Core.Services
private bool IsFileNodeUnsecure(FileInPackageInfo fileInPackageInfo)
{
// Should be done with regex :)
if (fileInPackageInfo.Directory.ToLower().Contains(IOHelper.DirSepChar + "app_code")) return true;
if (fileInPackageInfo.Directory.ToLower().Contains(IOHelper.DirSepChar + "bin")) return true;

View File

@@ -1048,7 +1048,7 @@
<Compile Include="Services\IMembershipUserService.cs" />
<Compile Include="Services\IMemberTypeService.cs" />
<Compile Include="Services\INotificationService.cs" />
<Compile Include="Services\IPackageValidationHelper.cs" />
<Compile Include="Services\IConflictingPackageContentFinder.cs" />
<Compile Include="Services\IRelationService.cs" />
<Compile Include="Services\IPackageInstallerService.cs" />
<Compile Include="Services\ISectionService.cs" />
@@ -1065,7 +1065,7 @@
<Compile Include="Services\MemberTypeService.cs" />
<Compile Include="Services\NotificationService.cs" />
<Compile Include="Services\PackageInstallerService.cs" />
<Compile Include="Services\PackageValidationHelper.cs" />
<Compile Include="Services\ConflictingPackageContentFinder.cs" />
<Compile Include="Services\RelationService.cs" />
<Compile Include="Services\SectionService.cs" />
<Compile Include="Services\ServerRegistrationService.cs" />