Removes lots of Dead Code - thanks NDepend!
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows for converting string representations of 0 and 1 to boolean
|
||||
/// </summary>
|
||||
internal class CustomBooleanTypeConverter : BooleanConverter
|
||||
{
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
if (sourceType == typeof(string))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
if (value is string)
|
||||
{
|
||||
var str = (string)value;
|
||||
if (str == "1") return true;
|
||||
if (str == "0" || str == "") return false;
|
||||
}
|
||||
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using System.Configuration;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
internal class LinkElement : ConfigurationElement, ILink
|
||||
{
|
||||
[ConfigurationProperty("application")]
|
||||
internal string Application
|
||||
{
|
||||
get { return (string)base["application"]; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("applicationUrl")]
|
||||
internal string ApplicationUrl
|
||||
{
|
||||
get { return (string)base["applicationUrl"]; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("language")]
|
||||
internal string Language
|
||||
{
|
||||
get { return (string)base["language"]; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("userType")]
|
||||
internal string UserType
|
||||
{
|
||||
get { return (string)base["userType"]; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("helpUrl")]
|
||||
internal string HelpUrl
|
||||
{
|
||||
get { return (string)base["helpUrl"]; }
|
||||
}
|
||||
|
||||
string ILink.Application
|
||||
{
|
||||
get { return Application; }
|
||||
}
|
||||
|
||||
string ILink.ApplicationUrl
|
||||
{
|
||||
get { return ApplicationUrl; }
|
||||
}
|
||||
|
||||
string ILink.Language
|
||||
{
|
||||
get { return Language; }
|
||||
}
|
||||
|
||||
string ILink.UserType
|
||||
{
|
||||
get { return UserType; }
|
||||
}
|
||||
|
||||
string ILink.HelpUrl
|
||||
{
|
||||
get { return HelpUrl; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
internal class LinksCollection : ConfigurationElementCollection, IEnumerable<ILink>
|
||||
{
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new LinkElement();
|
||||
}
|
||||
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((LinkElement)element).Application
|
||||
+ ((LinkElement)element).ApplicationUrl
|
||||
+ ((LinkElement)element).Language
|
||||
+ ((LinkElement)element).UserType;
|
||||
}
|
||||
|
||||
IEnumerator<ILink> IEnumerable<ILink>.GetEnumerator()
|
||||
{
|
||||
for (var i = 0; i < Count; i++)
|
||||
{
|
||||
yield return BaseGet(i) as ILink;
|
||||
}
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.ComponentModel;
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
public static partial class Constants
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the identifiers for Umbraco system nodes.
|
||||
/// </summary>
|
||||
@@ -54,5 +54,10 @@ namespace Umbraco.Core
|
||||
public const string SessionIdClaimType = "http://umbraco.org/2015/02/identity/claims/backoffice/sessionid";
|
||||
|
||||
}
|
||||
|
||||
public static class IO
|
||||
{
|
||||
public const string MediaFileSystemProvider = "media";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
internal static class ControlExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Recursively finds a control with the specified identifier.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">
|
||||
/// The type of control to be found.
|
||||
/// </typeparam>
|
||||
/// <param name="parent">
|
||||
/// The parent control from which the search will start.
|
||||
/// </param>
|
||||
/// <param name="id">
|
||||
/// The identifier of the control to be found.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The control with the specified identifier, otherwise <see langword="null"/> if the control
|
||||
/// is not found.
|
||||
/// </returns>
|
||||
public static T FindControlRecursive<T>(this Control parent, string id) where T : Control
|
||||
{
|
||||
if ((parent is T) && (parent.ID == id))
|
||||
{
|
||||
return (T)parent;
|
||||
}
|
||||
|
||||
foreach (Control control in parent.Controls)
|
||||
{
|
||||
var foundControl = FindControlRecursive<T>(control, id);
|
||||
if (foundControl != null)
|
||||
{
|
||||
return foundControl;
|
||||
}
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.Dynamics
|
||||
{
|
||||
[Obsolete("This class should not be used, it is just referenced by already obsoleted code and will be removed in the future")]
|
||||
internal static class ExtensionMethods
|
||||
{
|
||||
//public static IEnumerable<TSource> Map<TSource>(
|
||||
// this IEnumerable<TSource> source,
|
||||
// Func<TSource, bool> selectorFunction,
|
||||
// Func<TSource, IEnumerable<TSource>> getChildrenFunction)
|
||||
//{
|
||||
// if (!source.Any())
|
||||
// {
|
||||
// return source;
|
||||
// }
|
||||
// // Add what we have to the stack
|
||||
// var flattenedList = source.Where(selectorFunction);
|
||||
// // Go through the input enumerable looking for children,
|
||||
// // and add those if we have them
|
||||
// foreach (TSource element in source)
|
||||
// {
|
||||
// var secondInner = getChildrenFunction(element);
|
||||
// if (secondInner.Any())
|
||||
// {
|
||||
// secondInner = secondInner.Map(selectorFunction, getChildrenFunction);
|
||||
// }
|
||||
// flattenedList = flattenedList.Concat(secondInner);
|
||||
// }
|
||||
// return flattenedList;
|
||||
//}
|
||||
|
||||
[Obsolete("This method should not be used and will be removed in the future")]
|
||||
public static bool ContainsAny(this string haystack, IEnumerable<string> needles)
|
||||
{
|
||||
return StringExtensions.ContainsAny(haystack, needles);
|
||||
}
|
||||
[Obsolete("This method should not be used and will be removed in the future")]
|
||||
public static bool ContainsAny(this string haystack, params string[] needles)
|
||||
{
|
||||
return StringExtensions.ContainsAny(haystack, needles);
|
||||
}
|
||||
[Obsolete("This method should not be used and will be removed in the future")]
|
||||
public static bool ContainsAny(this string haystack, StringComparison comparison, IEnumerable<string> needles)
|
||||
{
|
||||
return StringExtensions.ContainsAny(haystack, needles, comparison);
|
||||
}
|
||||
[Obsolete("This method should not be used and will be removed in the future")]
|
||||
public static bool ContainsAny(this string haystack, StringComparison comparison, params string[] needles)
|
||||
{
|
||||
return StringExtensions.ContainsAny(haystack, needles, comparison);
|
||||
}
|
||||
[Obsolete("This method should not be used and will be removed in the future")]
|
||||
public static bool ContainsInsensitive(this string haystack, string needle)
|
||||
{
|
||||
if (haystack == null) throw new ArgumentNullException("haystack");
|
||||
return haystack.IndexOf(needle, StringComparison.CurrentCultureIgnoreCase) >= 0;
|
||||
}
|
||||
[Obsolete("This method should not be used and will be removed in the future")]
|
||||
public static bool HasValue(this string s)
|
||||
{
|
||||
return !string.IsNullOrWhiteSpace(s);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Umbraco.Core.CodeAnnotations;
|
||||
|
||||
namespace Umbraco.Core.IO
|
||||
{
|
||||
internal class FileSystemProviderConstants
|
||||
{
|
||||
public const string Media = "media";
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace Umbraco.Core.Macros
|
||||
{
|
||||
/// <summary>
|
||||
/// NOTE: This is legacy code, might require a cleanup
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
internal class PersistableMacroProperty
|
||||
{
|
||||
#region Private Fields
|
||||
private string _name;
|
||||
private string _alias;
|
||||
private string _value;
|
||||
private string _assemblyName;
|
||||
private string _typeName;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Macro Caption
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get { return _name; }
|
||||
set { _name = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Macro Alias
|
||||
/// </summary>
|
||||
public string Alias
|
||||
{
|
||||
get { return _alias; }
|
||||
set { _alias = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Macro Value
|
||||
/// </summary>
|
||||
public string Value
|
||||
{
|
||||
get { return _value; }
|
||||
set { _value = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// AssemblyName of the Property of teh Macro
|
||||
/// </summary>
|
||||
public string AssemblyName
|
||||
{
|
||||
get { return _assemblyName; }
|
||||
set { _assemblyName = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TypeName of the property of the macro
|
||||
/// </summary>
|
||||
public string TypeName
|
||||
{
|
||||
get { return _typeName; }
|
||||
set { _typeName = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -19,25 +19,7 @@ namespace Umbraco.Core.Media.Exif
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The exception that is thrown when the IFD section ID could not be understood.
|
||||
/// </summary>
|
||||
internal class UnknownIFDSectionException : Exception
|
||||
{
|
||||
public UnknownIFDSectionException()
|
||||
: base("Unknown IFD section.")
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
public UnknownIFDSectionException(string message)
|
||||
: base(message)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The exception that is thrown when an invalid enum type is given to an
|
||||
@@ -57,22 +39,4 @@ namespace Umbraco.Core.Media.Exif
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The exception that is thrown when the 0th IFD section does not contain any fields.
|
||||
/// </summary>
|
||||
internal class IFD0IsEmptyException : Exception
|
||||
{
|
||||
public IFD0IsEmptyException()
|
||||
: base("0th IFD section cannot be empty.")
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
public IFD0IsEmptyException(string message)
|
||||
: base(message)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,24 +2,6 @@
|
||||
|
||||
namespace Umbraco.Core.Media.Exif
|
||||
{
|
||||
/// <summary>
|
||||
/// The exception that is thrown when the format of the image file
|
||||
/// could not be understood.
|
||||
/// </summary>
|
||||
internal class UnknownImageFormatException : Exception
|
||||
{
|
||||
public UnknownImageFormatException()
|
||||
: base("Unkown image format.")
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
public UnknownImageFormatException(string message)
|
||||
: base(message)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The exception that is thrown when the format of the image file
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class for static model mapping with automapper
|
||||
/// </summary>
|
||||
internal static class ModelMapperHelper
|
||||
{
|
||||
internal static IMappingExpression<TSource, TSource> SelfMap<TSource>(this IMapperConfiguration config)
|
||||
{
|
||||
return config.CreateMap<TSource, TSource>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a PropertyType (plugin) for a Macro
|
||||
/// </summary>
|
||||
internal interface IMacroPropertyType
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the unique Alias of the Property Type
|
||||
/// </summary>
|
||||
string Alias { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the Assembly used to render the Property Type
|
||||
/// </summary>
|
||||
string RenderingAssembly { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the Type used to render the Property Type
|
||||
/// </summary>
|
||||
string RenderingType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Base Type for storing the PropertyType (Int32, String, Boolean)
|
||||
/// </summary>
|
||||
MacroPropertyTypeBaseTypes BaseType { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum for the three allowed BaseTypes
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract(IsReference = true)]
|
||||
internal enum MacroPropertyTypeBaseTypes
|
||||
{
|
||||
[EnumMember]
|
||||
Int32,
|
||||
[EnumMember]
|
||||
Boolean,
|
||||
[EnumMember]
|
||||
String
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace Umbraco.Core.Models.Mapping
|
||||
{
|
||||
internal static class MappingExpressionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Ignores all unmapped members by default - Use with caution!
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource"></typeparam>
|
||||
/// <typeparam name="TDest"></typeparam>
|
||||
/// <param name="expression"></param>
|
||||
/// <returns></returns>
|
||||
public static IMappingExpression<TSource, TDest> IgnoreAllUnmapped<TSource, TDest>(this IMappingExpression<TSource, TDest> expression)
|
||||
{
|
||||
expression.ForAllMembers(opt => opt.Ignore());
|
||||
return expression;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models.EntityBase;
|
||||
|
||||
namespace Umbraco.Core.Models.Membership
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a Group for a Backoffice User
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Should be internal until a proper user/membership implementation
|
||||
/// is part of the roadmap.
|
||||
/// </remarks>
|
||||
[Serializable]
|
||||
[DataContract(IsReference = true)]
|
||||
internal class UserGroup : Entity
|
||||
{
|
||||
//Add UserCollection ?
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Core.Packaging
|
||||
{
|
||||
internal interface IPackageBuilding
|
||||
{
|
||||
}
|
||||
|
||||
internal class PackageBuilding : IPackageBuilding
|
||||
{
|
||||
private readonly IPackagingService _packagingService;
|
||||
|
||||
public PackageBuilding(IPackagingService packagingService)
|
||||
{
|
||||
_packagingService = packagingService;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
internal class UserSectionFactory
|
||||
{
|
||||
private readonly IUser _user;
|
||||
|
||||
public UserSectionFactory(IUser user)
|
||||
{
|
||||
_user = user;
|
||||
}
|
||||
|
||||
public IEnumerable<string> BuildEntity(IEnumerable<User2AppDto> dto)
|
||||
{
|
||||
return dto.Select(x => x.AppAlias);
|
||||
}
|
||||
|
||||
public IEnumerable<User2AppDto> BuildDto(IEnumerable<string> entity)
|
||||
{
|
||||
return entity.Select(x => new User2AppDto
|
||||
{
|
||||
//NOTE: We're force casting to int here! this might not work in the future
|
||||
UserId = (int)_user.Id,
|
||||
AppAlias = x
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -174,9 +174,9 @@
|
||||
<Compile Include="Cache\DeepCloneRuntimeCacheProvider.cs" />
|
||||
<Compile Include="CodeAnnotations\FriendlyNameAttribute.cs" />
|
||||
<Compile Include="CodeAnnotations\UmbracoObjectTypeAttribute.cs" />
|
||||
<Compile Include="CodeAnnotations\UmbracoProposedPublicAttribute.cs" />
|
||||
<Compile Include="CodeAnnotations\UmbracoWillObsoleteAttribute.cs" />
|
||||
<Compile Include="CodeAnnotations\UmbracoExperimentalFeatureAttribute.cs" />
|
||||
<Compile Include="CodeAnnotations\UmbracoProposedPublicAttribute.cs" />
|
||||
<Compile Include="Collections\DeepCloneableList.cs" />
|
||||
<Compile Include="Collections\ListCloneBehavior.cs" />
|
||||
<Compile Include="ConcurrentHashSet.cs" />
|
||||
@@ -225,7 +225,6 @@
|
||||
<Compile Include="Configuration\UmbracoSettings\ImagingAutoFillUploadFieldElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ContentImagingElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ContentScriptEditorElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\CustomBooleanTypeConverter.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\DeveloperElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\DisabledLogTypesCollection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\DistributedCallElement.cs" />
|
||||
@@ -253,8 +252,6 @@
|
||||
<Compile Include="Configuration\UmbracoSettings\ITemplatesSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IUmbracoSettingsSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IWebRoutingSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\LinkElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\LinksCollection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\LoggingElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\LogTypeElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\NotificationsElement.cs" />
|
||||
@@ -281,7 +278,6 @@
|
||||
<Compile Include="Attempt.cs" />
|
||||
<Compile Include="Constants-Examine.cs" />
|
||||
<Compile Include="Constants-Icons.cs" />
|
||||
<Compile Include="ControlExtensions.cs" />
|
||||
<Compile Include="CoreBootManager.cs" />
|
||||
<Compile Include="DatabaseContext.cs" />
|
||||
<Compile Include="DataTableExtensions.cs" />
|
||||
@@ -363,7 +359,6 @@
|
||||
<Compile Include="Models\IMigrationEntry.cs" />
|
||||
<Compile Include="Models\IPublishedContentWithKey.cs" />
|
||||
<Compile Include="Models\IServerRegistration.cs" />
|
||||
<Compile Include="Models\Mapping\MappingExpressionExtensions.cs" />
|
||||
<Compile Include="Models\MigrationEntry.cs" />
|
||||
<Compile Include="Models\PartialViewType.cs" />
|
||||
<Compile Include="Models\PublicAccessEntry.cs" />
|
||||
@@ -543,7 +538,6 @@
|
||||
<Compile Include="Manifest\PropertyEditorConverter.cs" />
|
||||
<Compile Include="Media\ImageHelper.cs" />
|
||||
<Compile Include="Media\MediaSubfolderCounter.cs" />
|
||||
<Compile Include="ModelMapperHelper.cs" />
|
||||
<Compile Include="Models\ContentBase.cs" />
|
||||
<Compile Include="Models\ContentExtensions.cs" />
|
||||
<Compile Include="Enum.cs" />
|
||||
@@ -594,7 +588,6 @@
|
||||
<Compile Include="Packaging\Models\InstallationSummary.cs" />
|
||||
<Compile Include="Packaging\Models\MetaData.cs" />
|
||||
<Compile Include="Packaging\Models\PackageAction.cs" />
|
||||
<Compile Include="Packaging\PackageBuilding.cs" />
|
||||
<Compile Include="Packaging\PackageExtraction.cs" />
|
||||
<Compile Include="Packaging\PackageInstallation.cs" />
|
||||
<Compile Include="Packaging\PackageBinaryInspector.cs" />
|
||||
@@ -672,7 +665,6 @@
|
||||
<Compile Include="Models\ILanguage.cs" />
|
||||
<Compile Include="Models\IMacro.cs" />
|
||||
<Compile Include="Models\IMacroProperty.cs" />
|
||||
<Compile Include="Models\IMacroPropertyType.cs" />
|
||||
<Compile Include="Models\ITag.cs" />
|
||||
<Compile Include="Models\Macro.cs" />
|
||||
<Compile Include="Models\PublishedContent\PublishedContentExtended.cs" />
|
||||
@@ -680,7 +672,6 @@
|
||||
<Compile Include="Models\PublishedContent\PublishedContentExtensionsForModels.cs" />
|
||||
<Compile Include="Models\MacroProperty.cs" />
|
||||
<Compile Include="Models\MacroPropertyCollection.cs" />
|
||||
<Compile Include="Models\MacroPropertyTypeBaseTypes.cs" />
|
||||
<Compile Include="Models\MacroTypes.cs" />
|
||||
<Compile Include="Models\PublishedContent\PublishedContentWrapped.cs" />
|
||||
<Compile Include="Models\PublishedContent\PublishedContentType.cs" />
|
||||
@@ -710,7 +701,6 @@
|
||||
<Compile Include="Models\Membership\IUser.cs" />
|
||||
<Compile Include="Models\Membership\IUserType.cs" />
|
||||
<Compile Include="Models\Membership\User.cs" />
|
||||
<Compile Include="Models\Membership\UserGroup.cs" />
|
||||
<Compile Include="Models\Membership\UserType.cs" />
|
||||
<Compile Include="Models\PropertyExtensions.cs" />
|
||||
<Compile Include="Models\PublishedItemType.cs" />
|
||||
@@ -743,7 +733,6 @@
|
||||
<Compile Include="Persistence\Factories\ServerRegistrationFactory.cs" />
|
||||
<Compile Include="Persistence\Factories\TagFactory.cs" />
|
||||
<Compile Include="Persistence\Factories\UmbracoEntityFactory.cs" />
|
||||
<Compile Include="Persistence\Factories\UserSectionFactory.cs" />
|
||||
<Compile Include="Persistence\FaultHandling\ITransientErrorDetectionStrategy.cs" />
|
||||
<Compile Include="Persistence\FaultHandling\RetryingEventArgs.cs" />
|
||||
<Compile Include="Persistence\FaultHandling\RetryLimitExceededException.cs" />
|
||||
@@ -1094,7 +1083,6 @@
|
||||
<Compile Include="Dynamics\DynamicQueryableGetMemberBinder.cs" />
|
||||
<Compile Include="Dynamics\DynamicXml.cs" />
|
||||
<Compile Include="Dynamics\ExtensionMethodFinder.cs" />
|
||||
<Compile Include="Dynamics\ExtensionMethods.cs" />
|
||||
<Compile Include="Dynamics\PropertyResultType.cs" />
|
||||
<Compile Include="IO\FileSystemProviderAttribute.cs" />
|
||||
<Compile Include="IO\FileSystemExtensions.cs" />
|
||||
@@ -1185,7 +1173,6 @@
|
||||
<Compile Include="Logging\AsynchronousRollingFileAppender.cs" />
|
||||
<Compile Include="Logging\LoggingTaskExtension.cs" />
|
||||
<Compile Include="Logging\LogHelper.cs" />
|
||||
<Compile Include="Macros\PersistableMacroProperty.cs" />
|
||||
<Compile Include="ObjectExtensions.cs" />
|
||||
<Compile Include="ObjectResolution\ManyObjectsResolverBase.cs" />
|
||||
<Compile Include="ObjectResolution\ObjectLifetimeScope.cs" />
|
||||
@@ -1356,7 +1343,6 @@
|
||||
<Compile Include="IfExtensions.cs" />
|
||||
<Compile Include="PluginManager.cs" />
|
||||
<Compile Include="IO\FileSecurityException.cs" />
|
||||
<Compile Include="IO\FileSystemProviderConstants.cs" />
|
||||
<Compile Include="IO\FileSystemProviderManager.cs" />
|
||||
<Compile Include="IO\IFileSystem.cs" />
|
||||
<Compile Include="IO\IOHelper.cs" />
|
||||
|
||||
@@ -1002,25 +1002,7 @@ namespace Umbraco.Tests.CoreXml
|
||||
Root = new TestRootContent(type).WithChildren(1);
|
||||
}
|
||||
}
|
||||
|
||||
class TestSource3 : TestSourceBase
|
||||
{
|
||||
public TestSource3()
|
||||
{
|
||||
LastAttributeIndex = 1;
|
||||
|
||||
var prop1 = new TestPropertyType("prop1");
|
||||
var prop2 = new TestPropertyType("prop2");
|
||||
var prop3 = new TestPropertyType("prop3");
|
||||
var type = new TestRootContentType(this, prop1, prop2);
|
||||
var type1 = type.CreateType("type1", prop3);
|
||||
|
||||
Content[1] = new TestContent(type1, 1, 1).WithValues("1:p1", "1:p2", "1:p3").WithChildren(2);
|
||||
Content[2] = new TestContent(type1, 2, 1).WithValues("2:p1", "2:p2", "2:p3");
|
||||
|
||||
Root = new TestRootContent(type).WithChildren(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class TestSource4 : TestSourceBase
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
|
||||
@@ -23,7 +24,7 @@ namespace Umbraco.Tests.IO
|
||||
[Test]
|
||||
public void Can_Get_Base_File_System()
|
||||
{
|
||||
var fs = FileSystemProviderManager.Current.GetUnderlyingFileSystemProvider(FileSystemProviderConstants.Media);
|
||||
var fs = FileSystemProviderManager.Current.GetUnderlyingFileSystemProvider(Constants.IO.MediaFileSystemProvider);
|
||||
|
||||
Assert.NotNull(fs);
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Sync;
|
||||
|
||||
namespace Umbraco.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to boot up the server messenger once the application succesfully starts
|
||||
/// </summary>
|
||||
internal class BatchedDatabaseServerMessengerStartup : ApplicationEventHandler
|
||||
{
|
||||
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
||||
{
|
||||
var messenger = ServerMessengerResolver.HasCurrent
|
||||
? ServerMessengerResolver.Current.Messenger as BatchedDatabaseServerMessenger
|
||||
: null;
|
||||
|
||||
if (messenger != null)
|
||||
messenger.Startup();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,7 @@ namespace Umbraco.Web.PublishedCache
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to cached contents.
|
||||
/// </summary>
|
||||
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1153",
|
||||
"We need to create something like the IPublishListener interface to have proper published content storage.")]
|
||||
/// </summary>
|
||||
public interface IPublishedCache
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -313,7 +313,6 @@
|
||||
</Compile>
|
||||
<Compile Include="ApplicationContextExtensions.cs" />
|
||||
<Compile Include="AreaRegistrationContextExtensions.cs" />
|
||||
<Compile Include="BatchedDatabaseServerMessengerStartup.cs" />
|
||||
<Compile Include="Cache\ICacheRefresher.cs" />
|
||||
<Compile Include="DefaultHttpContextAccessor.cs" />
|
||||
<Compile Include="DefaultUmbracoContextAccessor.cs" />
|
||||
@@ -947,7 +946,6 @@
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controllers\UmbLoginController.cs" />
|
||||
<Compile Include="umbraco.presentation\umbraco\Trees\TranslateTreeNames.cs" />
|
||||
<Compile Include="UrlHelperExtensions.cs" />
|
||||
<Compile Include="Editors\MediaController.cs" />
|
||||
<Compile Include="UrlHelperRenderExtensions.cs" />
|
||||
@@ -1146,7 +1144,6 @@
|
||||
<Compile Include="WebApi\UmbracoAuthorizedApiController.cs" />
|
||||
<Compile Include="WebApi\Filters\ValidationFilterAttribute.cs" />
|
||||
<Compile Include="WebApi\Filters\UmbracoUserTimeoutFilterAttribute.cs" />
|
||||
<Compile Include="WebApi\WebApiHelper.cs" />
|
||||
<Compile Include="WebBootManager.cs" />
|
||||
<Compile Include="Routing\LegacyRequestInitializer.cs" />
|
||||
<Compile Include="Mvc\ControllerExtensions.cs" />
|
||||
@@ -1278,7 +1275,6 @@
|
||||
<Compile Include="umbraco.presentation\umbraco\developer\RelationTypes\NewRelationType.aspx.designer.cs">
|
||||
<DependentUpon>NewRelationType.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\developer\RelationTypes\ReadOnlyRelation.cs" />
|
||||
<Compile Include="umbraco.presentation\umbraco\developer\RelationTypes\RelationTypesWebService.asmx.cs">
|
||||
<DependentUpon>RelationTypesWebService.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
@@ -1655,7 +1651,6 @@
|
||||
</Compile>
|
||||
<Compile Include="WebServices\XmlDataIntegrityController.cs" />
|
||||
<Compile Include="WebViewPageExtensions.cs" />
|
||||
<Compile Include="_Legacy\Utils\EncodedStringWriter.cs" />
|
||||
<Compile Include="_Legacy\Utils\JSONSerializer.cs" />
|
||||
<None Include="..\Umbraco.Web.UI\Views\web.config">
|
||||
<Link>Mvc\web.config</Link>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Controllers;
|
||||
using System.Web.Http.Hosting;
|
||||
using System.Web.Http.Routing;
|
||||
|
||||
namespace Umbraco.Web.WebApi
|
||||
{
|
||||
internal static class WebApiHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// A helper method to create a WebAPI HttpControllerContext which can be used to execute a controller manually
|
||||
/// </summary>
|
||||
/// <param name="method"></param>
|
||||
/// <param name="uri"></param>
|
||||
/// <param name="httpContext"></param>
|
||||
/// <returns></returns>
|
||||
internal static HttpControllerContext CreateContext(HttpMethod method, Uri uri, HttpContextBase httpContext)
|
||||
{
|
||||
var config = new HttpConfiguration(GlobalConfiguration.Configuration.Routes);
|
||||
IHttpRouteData route = new HttpRouteData(new HttpRoute());
|
||||
var req = new HttpRequestMessage(method, uri);
|
||||
req.Properties[HttpPropertyKeys.HttpConfigurationKey] = config;
|
||||
req.Properties[HttpPropertyKeys.HttpRouteDataKey] = route;
|
||||
req.Properties["MS_HttpContext"] = httpContext;
|
||||
return new HttpControllerContext(config, route, req);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Umbraco.Web._Legacy.Utils
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// A TextWriter class based on the StringWriter that can support any encoding, not just UTF-16
|
||||
/// as is the default of the normal StringWriter class
|
||||
/// </summary>
|
||||
[Obsolete("Remove this for v8")]
|
||||
internal class EncodedStringWriter : StringWriter
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EncodedStringWriter"/> class.
|
||||
/// </summary>
|
||||
/// <param name="sb">The sb.</param>
|
||||
/// <param name="enc">The enc.</param>
|
||||
public EncodedStringWriter(StringBuilder sb, Encoding enc)
|
||||
: base(sb)
|
||||
{
|
||||
m_encoding = enc;
|
||||
}
|
||||
|
||||
private Encoding m_encoding;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="T:System.Text.Encoding"></see> in which the output is written.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
/// <returns>The Encoding in which the output is written.</returns>
|
||||
public override Encoding Encoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_encoding;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System.Linq;
|
||||
using umbraco.cms.businesslogic.language;
|
||||
|
||||
namespace Umbraco.Web.umbraco.presentation.umbraco.Trees
|
||||
{
|
||||
internal class TranslateTreeNames
|
||||
{
|
||||
public static string GetTranslatedName(string originalName)
|
||||
{
|
||||
|
||||
if (originalName.StartsWith("#") == false)
|
||||
return originalName;
|
||||
|
||||
var lang = Language.GetByCultureCode(System.Threading.Thread.CurrentThread.CurrentCulture.Name);
|
||||
|
||||
if (lang != null && global::umbraco.cms.businesslogic.Dictionary.DictionaryItem.hasKey(originalName.Substring(1, originalName.Length - 1)))
|
||||
{
|
||||
var dictionaryItem = new global::umbraco.cms.businesslogic.Dictionary.DictionaryItem(originalName.Substring(1, originalName.Length - 1));
|
||||
if (dictionaryItem != null)
|
||||
return dictionaryItem.Value(lang.id);
|
||||
}
|
||||
|
||||
return "[" + originalName + "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace umbraco.cms.presentation.developer.RelationTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// This is used to build a collection of relations from a single sql statement,
|
||||
/// as the umbraco.cms.businesslogic.relation.Relation obj will hit the DB for each instace it creates
|
||||
/// </summary>
|
||||
internal struct ReadOnlyRelation
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Relation Id
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Relation Parent Id
|
||||
/// </summary>
|
||||
public int ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Relation Parent Text
|
||||
/// </summary>
|
||||
public string ParentText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Relation Child Id
|
||||
/// </summary>
|
||||
public int ChildId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Relation Child Text
|
||||
/// </summary>
|
||||
public string ChildText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Relation RelationType Id
|
||||
/// </summary>
|
||||
public int RelType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Relation DateTime
|
||||
/// </summary>
|
||||
public DateTime DateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Relation Comment
|
||||
/// </summary>
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Examine;
|
||||
using Examine.LuceneEngine.Config;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace UmbracoExamine
|
||||
{
|
||||
internal class ExamineHelper
|
||||
{
|
||||
|
||||
public static IndexSet GetConfiguredIndexSet(string name, System.Collections.Specialized.NameValueCollection config, string matchingVerb, Func<bool> alreadyConfiguredCheck)
|
||||
{
|
||||
//Need to check if the index set or IndexerData is specified...
|
||||
|
||||
if (config["indexSet"] == null && alreadyConfiguredCheck() == false)
|
||||
{
|
||||
//if we don't have either, then we'll try to set the index set by naming conventions
|
||||
if (name.EndsWith(matchingVerb))
|
||||
{
|
||||
var setNameByConvension = name.Remove(name.LastIndexOf(matchingVerb)) + "IndexSet";
|
||||
//check if we can assign the index set by naming convention
|
||||
var set = IndexSets.Instance.Sets.Cast<IndexSet>().SingleOrDefault(x => x.SetName == setNameByConvension);
|
||||
|
||||
if (set != null)
|
||||
{
|
||||
//we've found an index set by naming conventions :)
|
||||
return set;
|
||||
}
|
||||
}
|
||||
|
||||
throw new ArgumentNullException("indexSet on LuceneExamineIndexer provider has not been set in configuration and/or the IndexerData property has not been explicitly set");
|
||||
}
|
||||
|
||||
if (config["indexSet"] != null)
|
||||
{
|
||||
//if an index set is specified, ensure it exists and initialize the indexer based on the set
|
||||
|
||||
if (IndexSets.Instance.Sets[config["indexSet"]] == null)
|
||||
{
|
||||
throw new ArgumentException("The indexSet specified for the LuceneExamineIndexer provider does not exist");
|
||||
}
|
||||
var indexSetName = config["indexSet"];
|
||||
return IndexSets.Instance.Sets[indexSetName];
|
||||
}
|
||||
|
||||
//it's already configured internally
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,6 @@
|
||||
<Compile Include="DataServices\UmbracoContentService.cs" />
|
||||
<Compile Include="DataServices\UmbracoMediaService.cs" />
|
||||
<Compile Include="DeletePolicyTracker.cs" />
|
||||
<Compile Include="ExamineHelper.cs" />
|
||||
<Compile Include="IndexTypes.cs" />
|
||||
<Compile Include="LegacyLibrary.cs" />
|
||||
<Compile Include="LocalStorage\AzureLocalStorageDirectory.cs" />
|
||||
|
||||
Reference in New Issue
Block a user