diff --git a/src/Umbraco.Core/Attempt.cs b/src/Umbraco.Core/Attempt.cs
index 5871626505..d13ec6394c 100644
--- a/src/Umbraco.Core/Attempt.cs
+++ b/src/Umbraco.Core/Attempt.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Core
public static class Attempt
{
// note:
- // cannot rely on overloads only to differenciate between with/without status
+ // cannot rely on overloads only to differentiate between with/without status
// in some cases it will always be ambiguous, so be explicit w/ 'WithStatus' methods
///
diff --git a/src/Umbraco.Core/AttemptOfTResult.cs b/src/Umbraco.Core/AttemptOfTResult.cs
index 55b1ea0a1e..79fae017e2 100644
--- a/src/Umbraco.Core/AttemptOfTResult.cs
+++ b/src/Umbraco.Core/AttemptOfTResult.cs
@@ -121,7 +121,7 @@ namespace Umbraco.Core
}
///
- /// Implicity operator to check if the attempt was successful without having to access the 'success' property
+ /// Implicitly operator to check if the attempt was successful without having to access the 'success' property
///
///
///
diff --git a/src/Umbraco.Core/AttemptOfTResultTStatus.cs b/src/Umbraco.Core/AttemptOfTResultTStatus.cs
index ca66b0a961..8ce21e36c3 100644
--- a/src/Umbraco.Core/AttemptOfTResultTStatus.cs
+++ b/src/Umbraco.Core/AttemptOfTResultTStatus.cs
@@ -130,7 +130,7 @@ namespace Umbraco.Core
}
///
- /// Implicity operator to check if the attempt was successful without having to access the 'success' property
+ /// Implicitly operator to check if the attempt was successful without having to access the 'success' property
///
///
///
diff --git a/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
index 371ab90a57..21e2b63597 100644
--- a/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
+++ b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
@@ -83,7 +83,7 @@ namespace Umbraco.Core.Cache
}
return entries
.Select(x => GetSafeLazyValue((Lazy
///
/// Will use HttpContext.Current.
- /// fixme/task: use IHttpContextAccessor NOT HttpContext.Current
+ /// TODO - https://github.com/umbraco/Umbraco-CMS/issues/4239 - use IHttpContextAccessor NOT HttpContext.Current
///
public HttpRequestAppCache()
{ }
diff --git a/src/Umbraco.Core/Cache/ICacheRefresher.cs b/src/Umbraco.Core/Cache/ICacheRefresher.cs
index 96cb9d5418..a9ac76af6e 100644
--- a/src/Umbraco.Core/Cache/ICacheRefresher.cs
+++ b/src/Umbraco.Core/Cache/ICacheRefresher.cs
@@ -4,7 +4,7 @@ using Umbraco.Core.Composing;
namespace Umbraco.Core.Cache
{
///
- /// The IcacheRefresher Interface is used for loadbalancing.
+ /// The IcacheRefresher Interface is used for load balancing.
///
///
public interface ICacheRefresher : IDiscoverable
diff --git a/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs
index 305ed00f9a..020f4f7dd9 100644
--- a/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs
+++ b/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs
@@ -48,7 +48,7 @@ namespace Umbraco.Core.Cache
/// Updates an entity.
///
/// The entity.
- /// The reopsitory PersistUpdatedItem method.
+ /// The repository PersistUpdatedItem method.
/// Updates the entity in the repository, and updates the cache accordingly.
void Update(TEntity entity, Action persistUpdated);
diff --git a/src/Umbraco.Core/Components/CompositionExtensions.cs b/src/Umbraco.Core/Components/CompositionExtensions.cs
index bb23e89b81..2aef865994 100644
--- a/src/Umbraco.Core/Components/CompositionExtensions.cs
+++ b/src/Umbraco.Core/Components/CompositionExtensions.cs
@@ -203,7 +203,7 @@ namespace Umbraco.Core.Components
/// Sets the server registrar.
///
/// The composition.
- /// A function creating a server registar.
+ /// A function creating a server registrar.
public static void SetServerRegistrar(this Composition composition, Func factory)
{
composition.RegisterUnique(factory);
diff --git a/src/Umbraco.Core/Composing/TypeFinder.cs b/src/Umbraco.Core/Composing/TypeFinder.cs
index 86d3863994..4086eb394b 100644
--- a/src/Umbraco.Core/Composing/TypeFinder.cs
+++ b/src/Umbraco.Core/Composing/TypeFinder.cs
@@ -163,8 +163,8 @@ namespace Umbraco.Core.Composing
///
/// Return a list of found local Assemblies excluding the known assemblies we don't want to scan
- /// and exluding the ones passed in and excluding the exclusion list filter, the results of this are
- /// cached for perforance reasons.
+ /// and excluding the ones passed in and excluding the exclusion list filter, the results of this are
+ /// cached for performance reasons.
///
///
///
@@ -183,7 +183,7 @@ namespace Umbraco.Core.Composing
}
///
- /// Return a distinct list of found local Assemblies and exluding the ones passed in and excluding the exclusion list filter
+ /// Return a distinct list of found local Assemblies and excluding the ones passed in and excluding the exclusion list filter
///
///
///
@@ -204,7 +204,7 @@ namespace Umbraco.Core.Composing
}
///
- /// this is our assembly filter to filter out known types that def dont contain types we'd like to find or plugins
+ /// this is our assembly filter to filter out known types that def don't contain types we'd like to find or plugins
///
///
/// NOTE the comma vs period... comma delimits the name in an Assembly FullName property so if it ends with comma then its an exact name match
diff --git a/src/Umbraco.Core/Composing/TypeHelper.cs b/src/Umbraco.Core/Composing/TypeHelper.cs
index 999d8d15f4..c2746bef96 100644
--- a/src/Umbraco.Core/Composing/TypeHelper.cs
+++ b/src/Umbraco.Core/Composing/TypeHelper.cs
@@ -153,7 +153,7 @@ namespace Umbraco.Core.Composing
{
var others = types.Except(new[] {curr});
- //is the curr type a common denominator for all others ?
+ //is the current type a common denominator for all others ?
var isBase = others.All(curr.IsAssignableFrom);
//if this type is the base for all others
diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs
index b31f16f30a..a2d6349ea0 100644
--- a/src/Umbraco.Core/Composing/TypeLoader.cs
+++ b/src/Umbraco.Core/Composing/TypeLoader.cs
@@ -109,7 +109,7 @@ namespace Umbraco.Core.Composing
/// Gets or sets the set of assemblies to scan.
///
///
- /// If not explicitely set, defaults to all assemblies except those that are know to not have any of the
+ /// If not explicitly set, defaults to all assemblies except those that are know to not have any of the
/// types we might scan. Because we only scan for application types, this means we can safely exclude GAC assemblies
/// for example.
/// This is for unit tests.
diff --git a/src/Umbraco.Core/Configuration/CoreDebug.cs b/src/Umbraco.Core/Configuration/CoreDebug.cs
index a71b311d7c..3e39eb6db5 100644
--- a/src/Umbraco.Core/Configuration/CoreDebug.cs
+++ b/src/Umbraco.Core/Configuration/CoreDebug.cs
@@ -15,7 +15,7 @@ namespace Umbraco.Core.Configuration
// this helps troubleshooting rogue scopes that we forget to complete
public bool LogUncompletedScopes { get; }
- // when true, the Logger creates a minidump of w3wp in ~/App_Data/MiniDump whenever it logs
+ // when true, the Logger creates a mini dump of w3wp in ~/App_Data/MiniDump whenever it logs
// an error due to a ThreadAbortException that is due to a timeout.
public bool DumpOnTimeoutThreadAbort { get; }
}
diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
index 05cb64325c..bc5b6993e3 100644
--- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs
+++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
@@ -44,7 +44,7 @@ namespace Umbraco.Core.Configuration
///
///
/// The assembly version is the value of the .
- /// Is is the one that the CLR checks for compatibility. Therefore, it changes only on
+ /// Is the one that the CLR checks for compatibility. Therefore, it changes only on
/// hard-breaking changes (for instance, on new major versions).
///
public static Version AssemblyVersion {get; }
@@ -81,7 +81,7 @@ namespace Umbraco.Core.Configuration
{
try
{
- // fixme/task - stop having version in web.config appSettings
+ // TODO - https://github.com/umbraco/Umbraco-CMS/issues/4238 - stop having version in web.config appSettings
var value = ConfigurationManager.AppSettings["umbracoConfigurationStatus"];
return value.IsNullOrWhiteSpace() ? null : SemVersion.TryParse(value, out var semver) ? semver : null;
}
diff --git a/src/Umbraco.Core/Constants-Conventions.cs b/src/Umbraco.Core/Constants-Conventions.cs
index eb1a6e2925..b3281e8967 100644
--- a/src/Umbraco.Core/Constants-Conventions.cs
+++ b/src/Umbraco.Core/Constants-Conventions.cs
@@ -195,7 +195,7 @@ namespace Umbraco.Core
public const string LastLockoutDateLabel = "Last Lockout Date";
///
- /// Property alias for the number of failed login attemps
+ /// Property alias for the number of failed login attempts
///
public const string FailedPasswordAttempts = "umbracoMemberFailedPasswordAttempts";
diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs
index b09987ad90..b9f20fb449 100644
--- a/src/Umbraco.Core/Constants-PropertyEditors.cs
+++ b/src/Umbraco.Core/Constants-PropertyEditors.cs
@@ -178,6 +178,11 @@ namespace Umbraco.Core
/// Nested Content.
///
public const string NestedContent = "Umbraco.NestedContent";
+
+ ///
+ /// Alias for the multi url picker editor.
+ ///
+ public const string MultiUrlPicker = "Umbraco.MultiUrlPicker";
}
///
diff --git a/src/Umbraco.Core/ContentExtensions.cs b/src/Umbraco.Core/ContentExtensions.cs
index dce97ed0e3..dabd7b4bd5 100644
--- a/src/Umbraco.Core/ContentExtensions.cs
+++ b/src/Umbraco.Core/ContentExtensions.cs
@@ -85,7 +85,7 @@ namespace Umbraco.Core
#endregion
///
- /// Removes characters that are not valide XML characters from all entity properties
+ /// Removes characters that are not valid XML characters from all entity properties
/// of type string. See: http://stackoverflow.com/a/961504/5018
///
///
diff --git a/src/Umbraco.Core/DecimalExtensions.cs b/src/Umbraco.Core/DecimalExtensions.cs
index 24afb9f7a9..8b3218d88c 100644
--- a/src/Umbraco.Core/DecimalExtensions.cs
+++ b/src/Umbraco.Core/DecimalExtensions.cs
@@ -13,7 +13,7 @@
///
/// The value to normalize.
/// The normalized value.
- /// Normalizing changes the scaling factor and removes trailing zeroes,
+ /// Normalizing changes the scaling factor and removes trailing zeros,
/// so 1.2500m comes out as 1.25m.
public static decimal Normalize(this decimal value)
{
diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs
new file mode 100644
index 0000000000..f2a08575b5
--- /dev/null
+++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs
@@ -0,0 +1,34 @@
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+
+namespace Umbraco.Core.Deploy
+{
+ ///
+ /// Defines methods that can convert a data type configurations to / from an environment-agnostic string.
+ ///
+ /// Configurations may contain values such as content identifiers, that would be local
+ /// to one environment, and need to be converted in order to be deployed.
+ [SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "This is actual only used by Deploy, but we dont want third parties to have references on deploy, thats why this interface is part of core.")]
+ public interface IDataTypeConfigurationConnector
+ {
+ ///
+ /// Gets the property editor aliases that the value converter supports by default.
+ ///
+ IEnumerable PropertyEditorAliases { get; }
+
+ ///
+ /// Gets the environment-agnostic data type configurations corresponding to environment-specific configurations.
+ ///
+ /// The environment-specific configuration.
+ /// The dependencies.
+ ///
+ IDictionary ConvertToDeploy(IDictionary configuration, ICollection dependencies);
+
+ ///
+ /// Gets the environment-specific data type configurations corresponding to environment-agnostic configurations.
+ ///
+ /// The environment-agnostic configuration.
+ ///
+ IDictionary ConvertToLocalEnvironment(IDictionary configuration);
+ }
+}
diff --git a/src/Umbraco.Core/Deploy/IPreValueConnector.cs b/src/Umbraco.Core/Deploy/IPreValueConnector.cs
deleted file mode 100644
index 2a8f4e622d..0000000000
--- a/src/Umbraco.Core/Deploy/IPreValueConnector.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Collections.Generic;
-
-namespace Umbraco.Core.Deploy
-{
- ///
- /// Defines methods that can convert a preValue to / from an environment-agnostic string.
- ///
- /// PreValues may contain values such as content identifiers, that would be local
- /// to one environment, and need to be converted in order to be deployed.
- public interface IPreValueConnector // fixme/task: rename to IDataTypeConfigurationConnector + kill all "preValues" name usage
- {
- ///
- /// Gets the property editor aliases that the value converter supports by default.
- ///
- IEnumerable PropertyEditorAliases { get; }
-
- ///
- /// Gets the environment-agnostic preValues corresponding to environment-specific preValues.
- ///
- /// The environment-specific preValues.
- /// The dependencies.
- ///
- IDictionary ConvertToDeploy(IDictionary preValues, ICollection dependencies);
-
- ///
- /// Gets the environment-specific preValues corresponding to environment-agnostic preValues.
- ///
- /// The environment-agnostic preValues.
- ///
- IDictionary ConvertToLocalEnvironment(IDictionary preValues);
- }
-}
diff --git a/src/Umbraco.Core/DictionaryExtensions.cs b/src/Umbraco.Core/DictionaryExtensions.cs
index fb44ec7dcd..d9e998dbd1 100644
--- a/src/Umbraco.Core/DictionaryExtensions.cs
+++ b/src/Umbraco.Core/DictionaryExtensions.cs
@@ -10,7 +10,7 @@ using System.Web;
namespace Umbraco.Core
{
///
- /// Extension methods for dictionary & concurrentdictionary
+ /// Extension methods for Dictionary & ConcurrentDictionary
///
internal static class DictionaryExtensions
{
@@ -72,7 +72,7 @@ namespace Umbraco.Core
///
/// Taken from: http://stackoverflow.com/questions/12240219/is-there-a-way-to-use-concurrentdictionary-tryupdate-with-a-lambda-expression
///
- /// WARNING: If the value changes after we've retreived it, then the item will not be updated
+ /// WARNING: If the value changes after we've retrieved it, then the item will not be updated
///
public static bool TryUpdateOptimisitic(this ConcurrentDictionary dict, TKey key, Func updateFactory)
{
diff --git a/src/Umbraco.Core/EnumerableExtensions.cs b/src/Umbraco.Core/EnumerableExtensions.cs
index dc07f7c1f1..d71ccb04b9 100644
--- a/src/Umbraco.Core/EnumerableExtensions.cs
+++ b/src/Umbraco.Core/EnumerableExtensions.cs
@@ -265,7 +265,7 @@ namespace Umbraco.Core
return -1;
}
- ///Finds the index of the first occurence of an item in an enumerable.
+ ///Finds the index of the first occurrence of an item in an enumerable.
///The enumerable to search.
///The item to find.
///The index of the first matching item, or -1 if the item was not found.
diff --git a/src/Umbraco.Core/Events/CancellableEventArgs.cs b/src/Umbraco.Core/Events/CancellableEventArgs.cs
index e0eb24c579..0f3091c46a 100644
--- a/src/Umbraco.Core/Events/CancellableEventArgs.cs
+++ b/src/Umbraco.Core/Events/CancellableEventArgs.cs
@@ -61,7 +61,7 @@ namespace Umbraco.Core.Events
{
if (CanCancel == false)
{
- throw new InvalidOperationException("This event argument class does not support cancelling.");
+ throw new InvalidOperationException("This event argument class does not support canceling.");
}
return _cancel;
}
@@ -69,7 +69,7 @@ namespace Umbraco.Core.Events
{
if (CanCancel == false)
{
- throw new InvalidOperationException("This event argument class does not support cancelling.");
+ throw new InvalidOperationException("This event argument class does not support canceling.");
}
_cancel = value;
}
diff --git a/src/Umbraco.Core/Events/MacroErrorEventArgs.cs b/src/Umbraco.Core/Events/MacroErrorEventArgs.cs
index fee31356fc..afabec4d98 100644
--- a/src/Umbraco.Core/Events/MacroErrorEventArgs.cs
+++ b/src/Umbraco.Core/Events/MacroErrorEventArgs.cs
@@ -35,7 +35,7 @@ namespace Umbraco.Core.Events
public MacroErrorBehaviour Behaviour { get; set; }
///
- /// The html code to display when Behavior is Content.
+ /// The HTML code to display when Behavior is Content.
///
public string Html { get; set; }
}
diff --git a/src/Umbraco.Core/Events/MoveEventArgs.cs b/src/Umbraco.Core/Events/MoveEventArgs.cs
index aaeddc6921..f1b09917d8 100644
--- a/src/Umbraco.Core/Events/MoveEventArgs.cs
+++ b/src/Umbraco.Core/Events/MoveEventArgs.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Core.Events
///
///
///
- /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
+ /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
///
public MoveEventArgs(bool canCancel, EventMessages eventMessages, params MoveEventInfo[] moveInfo)
: base(default, canCancel, eventMessages)
@@ -34,7 +34,7 @@ namespace Umbraco.Core.Events
///
///
///
- /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
+ /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
///
public MoveEventArgs(EventMessages eventMessages, params MoveEventInfo[] moveInfo)
: base(default, eventMessages)
@@ -54,7 +54,7 @@ namespace Umbraco.Core.Events
///
///
///
- /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
+ /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
///
public MoveEventArgs(bool canCancel, params MoveEventInfo[] moveInfo)
: base(default, canCancel)
@@ -73,7 +73,7 @@ namespace Umbraco.Core.Events
/// Constructor accepting a collection of MoveEventInfo objects
///
///
- /// A colleciton of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
+ /// A collection of MoveEventInfo objects that exposes all entities that have been moved during a single move operation
///
public MoveEventArgs(params MoveEventInfo[] moveInfo)
: base(default)
diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs
index 8a4df686ee..b4dc6187fa 100644
--- a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs
+++ b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs
@@ -109,9 +109,9 @@ namespace Umbraco.Core.Events
public Type[] SupersedeTypes { get; set; }
}
- // this is way too convoluted, the superceede attribute is used only on DeleteEventargs to specify
- // that it superceeds save, publish, move and copy - BUT - publish event args is also used for
- // unpublishing and should NOT be superceeded - so really it should not be managed at event args
+ // this is way too convoluted, the supersede attribute is used only on DeleteEventargs to specify
+ // that it supersedes save, publish, move and copy - BUT - publish event args is also used for
+ // unpublishing and should NOT be superseded - so really it should not be managed at event args
// level but at event level
//
// what we want is:
@@ -136,7 +136,7 @@ namespace Umbraco.Core.Events
var result = new List();
var resultArgs = new List();
- // eagerly fetch superceeded arg types for each arg type
+ // eagerly fetch superseded arg types for each arg type
var argTypeSuperceeding = events.Select(x => x.Args.GetType())
.Distinct()
.ToDictionary(x => x, x => x.GetCustomAttributes(false).Select(y => y.SupersededEventArgsType).ToArray());
@@ -178,7 +178,7 @@ namespace Umbraco.Core.Events
continue;
}
- // look for this entity in superceding event args
+ // look for this entity in superseding event args
// found = must be removed (ie not added), else track
if (IsSuperceeded(eventEntity, infos, entities) == false)
{
@@ -203,7 +203,7 @@ namespace Umbraco.Core.Events
if (eventEntity == null)
continue;
- // look for this entity in superceding event args
+ // look for this entity in superseding event args
// found = must be removed, else track
if (IsSuperceeded(eventEntity, infos, entities))
toRemove.Add(eventEntity);
@@ -211,7 +211,7 @@ namespace Umbraco.Core.Events
entities.Add(Tuple.Create(eventEntity, infos));
}
- // remove superceded entities
+ // remove superseded entities
foreach (var entity in toRemove)
eventObjects.Remove(entity);
@@ -286,13 +286,13 @@ namespace Umbraco.Core.Events
// determines if a given entity, appearing in a given event definition, should be filtered out,
// considering the entities that have already been visited - an entity is filtered out if it
- // appears in another even definition, which superceedes this event definition.
+ // appears in another even definition, which supersedes this event definition.
private static bool IsSuperceeded(IEntity entity, EventDefinitionInfos infos, List> entities)
{
//var argType = meta.EventArgsType;
var argType = infos.EventDefinition.Args.GetType();
- // look for other instances of the same entity, coming from an event args that supercedes other event args,
+ // look for other instances of the same entity, coming from an event args that supersedes other event args,
// ie is marked with the attribute, and is not this event args (cannot supersede itself)
var superceeding = entities
.Where(x => x.Item2.SupersedeTypes.Length > 0 // has the attribute
@@ -304,20 +304,20 @@ namespace Umbraco.Core.Events
if (superceeding.Length == 0)
return false;
- // delete event args does NOT superceedes 'unpublished' event
+ // delete event args does NOT supersedes 'unpublished' event
if (argType.IsGenericType && argType.GetGenericTypeDefinition() == typeof(PublishEventArgs<>) && infos.EventDefinition.EventName == "Unpublished")
return false;
- // found occurences, need to determine if this event args is superceded
+ // found occurrences, need to determine if this event args is superseded
if (argType.IsGenericType)
{
// generic, must compare type arguments
var supercededBy = superceeding.FirstOrDefault(x =>
x.Item2.SupersedeTypes.Any(y =>
- // superceeding a generic type which has the same generic type definition
+ // superseding a generic type which has the same generic type definition
// (but ... no matter the generic type parameters? could be different?)
y.IsGenericTypeDefinition && y == argType.GetGenericTypeDefinition()
- // or superceeding a non-generic type which is ... (but... how is this ever possible? argType *is* generic?)
+ // or superceeding a non-generic type which is ... (but... how is this ever possible? argType *is* generic?
|| y.IsGenericTypeDefinition == false && y == argType));
return supercededBy != null;
}
diff --git a/src/Umbraco.Core/Events/SupersedeEventAttribute.cs b/src/Umbraco.Core/Events/SupersedeEventAttribute.cs
index 30a218a677..2488890a73 100644
--- a/src/Umbraco.Core/Events/SupersedeEventAttribute.cs
+++ b/src/Umbraco.Core/Events/SupersedeEventAttribute.cs
@@ -4,7 +4,7 @@ namespace Umbraco.Core.Events
{
///
/// This is used to know if the event arg attributed should supersede another event arg type when
- /// tracking events for the same entity. If one event args supercedes another then the event args that have been superseded
+ /// tracking events for the same entity. If one event args supersedes another then the event args that have been superseded
/// will mean that the event will not be dispatched or the args will be filtered to exclude the entity.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
diff --git a/src/Umbraco.Core/ExpressionHelper.cs b/src/Umbraco.Core/ExpressionHelper.cs
index db0e06eedb..7d5a246f0d 100644
--- a/src/Umbraco.Core/ExpressionHelper.cs
+++ b/src/Umbraco.Core/ExpressionHelper.cs
@@ -58,7 +58,7 @@ namespace Umbraco.Core
{
var boxedMember = unary.Operand as MemberExpression;
if (boxedMember == null)
- throw new ArgumentException("The type of property could not be infered, try specifying the type parameters explicitly. This can happen if you have tried to access PropertyInfo where the property's return type is a value type, but the expression is trying to convert it to an object");
+ throw new ArgumentException("The type of property could not be inferred, try specifying the type parameters explicitly. This can happen if you have tried to access PropertyInfo where the property's return type is a value type, but the expression is trying to convert it to an object");
else member = boxedMember;
}
}
@@ -75,7 +75,7 @@ namespace Umbraco.Core
if (type != propInfo.ReflectedType &&
!type.IsSubclassOf(propInfo.ReflectedType))
throw new ArgumentException(string.Format(
- "Expresion '{0}' refers to a property that is not from type {1}.",
+ "Expression '{0}' refers to a property that is not from type {1}.",
propertyLambda,
type));
diff --git a/src/Umbraco.Core/FileResources/Files.resx b/src/Umbraco.Core/FileResources/Files.resx
index 823aacefb7..29c7feee77 100644
--- a/src/Umbraco.Core/FileResources/Files.resx
+++ b/src/Umbraco.Core/FileResources/Files.resx
@@ -37,7 +37,7 @@
mimetype set.
The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
+ ResXResourceReader how to stop persisting the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
@@ -121,4 +121,4 @@
blockingweb.config;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252
-
\ No newline at end of file
+
diff --git a/src/Umbraco.Core/HashGenerator.cs b/src/Umbraco.Core/HashGenerator.cs
index f8e45c362d..80cc3c3de4 100644
--- a/src/Umbraco.Core/HashGenerator.cs
+++ b/src/Umbraco.Core/HashGenerator.cs
@@ -54,7 +54,7 @@ namespace Umbraco.Core
{
//I've tried to no allocate a new string with this which can be done if we use the CompareInfo.GetSortKey method which will create a new
//byte array that we can use to write to the output, however this also allocates new objects so i really don't think the performance
- //would be much different. In any case, i'll leave this here for reference. We could write the bytes out based on the sort key,
+ //would be much different. In any case, I'll leave this here for reference. We could write the bytes out based on the sort key,
//this is how we could deal with case insensitivity without allocating another string
//for reference see: https://stackoverflow.com/a/10452967/694494
//we could go a step further and s.Normalize() but we're not really dealing with crazy unicode with this class so far.
@@ -131,7 +131,7 @@ namespace Umbraco.Core
//create a StringBuilder object
var stringBuilder = new StringBuilder();
- //loop to each each byte
+ //loop to each byte
foreach (var b in hashedByteArray)
{
//append it to our StringBuilder
diff --git a/src/Umbraco.Core/HexEncoder.cs b/src/Umbraco.Core/HexEncoder.cs
index 073dc8b543..9202fd48fc 100644
--- a/src/Umbraco.Core/HexEncoder.cs
+++ b/src/Umbraco.Core/HexEncoder.cs
@@ -4,11 +4,11 @@ using System.Runtime.CompilerServices;
namespace Umbraco.Core
{
///
- /// Provides methods for encoding byte arrays into hexidecimal strings.
+ /// Provides methods for encoding byte arrays into hexadecimal strings.
///
internal static class HexEncoder
{
- // LUT's that provide the hexidecimal representation of each possible byte value.
+ // LUT's that provide the hexadecimal representation of each possible byte value.
private static readonly char[] HexLutBase = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
// The base LUT arranged in 16x each item order. 0 * 16, 1 * 16, .... F * 16
@@ -18,7 +18,7 @@ namespace Umbraco.Core
private static readonly char[] HexLutLo = Enumerable.Range(0, 256).Select(x => HexLutBase[x % 0x10]).ToArray();
///
- /// Converts a to a hexidecimal formatted padded to 2 digits.
+ /// Converts a to a hexadecimal formatted padded to 2 digits.
///
/// The bytes.
/// The .
@@ -40,7 +40,7 @@ namespace Umbraco.Core
}
///
- /// Converts a to a hexidecimal formatted padded to 2 digits
+ /// Converts a to a hexadecimal formatted padded to 2 digits
/// and split into blocks with the given char separator.
///
/// The bytes.
diff --git a/src/Umbraco.Core/IO/IFileSystem.cs b/src/Umbraco.Core/IO/IFileSystem.cs
index 14b015a468..0405c5925a 100644
--- a/src/Umbraco.Core/IO/IFileSystem.cs
+++ b/src/Umbraco.Core/IO/IFileSystem.cs
@@ -76,7 +76,7 @@ namespace Umbraco.Core.IO
IEnumerable GetFiles(string path, string filter);
///
- /// Gets a representing the file at the gieven path.
+ /// Gets a representing the file at the given path.
///
/// The path to the file.
///
diff --git a/src/Umbraco.Core/Logging/IProfiler.cs b/src/Umbraco.Core/Logging/IProfiler.cs
index 53d1d96072..1327651197 100644
--- a/src/Umbraco.Core/Logging/IProfiler.cs
+++ b/src/Umbraco.Core/Logging/IProfiler.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Logging
/// Renders the profiling results.
///
/// The profiling results.
- /// Generally used for Html rendering.
+ /// Generally used for HTML rendering.
string Render();
///
diff --git a/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs b/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs
index 1c6f9853a2..6775ea7417 100644
--- a/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs
+++ b/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs
@@ -92,7 +92,7 @@ namespace Umbraco.Core.Logging.Serilog
///
/// Reads settings from /config/serilog.user.config
- /// That allows a separate logging pipeline to be configured that wil not affect the main Umbraco log
+ /// That allows a separate logging pipeline to be configured that will not affect the main Umbraco log
///
/// A Serilog LoggerConfiguration
public static LoggerConfiguration ReadFromUserConfigFile(this LoggerConfiguration logConfig)
diff --git a/src/Umbraco.Core/MainDom.cs b/src/Umbraco.Core/MainDom.cs
index 0b4551a7cc..ca875c2167 100644
--- a/src/Umbraco.Core/MainDom.cs
+++ b/src/Umbraco.Core/MainDom.cs
@@ -165,7 +165,7 @@ namespace Umbraco.Core
// which may timeout, and this is accepted - see comments below
// signal, then wait for the lock, then make sure the event is
- // resetted (maybe there was noone listening..)
+ // reset (maybe there was noone listening..)
_signal.Set();
// if more than 1 instance reach that point, one will get the lock
@@ -175,7 +175,7 @@ namespace Umbraco.Core
_isMainDom = true;
// we need to reset the event, because otherwise we would end up
- // signaling ourselves and commiting suicide immediately.
+ // signaling ourselves and committing suicide immediately.
// only 1 instance can reach that point, but other instances may
// have started and be trying to get the lock - they will timeout,
// which is accepted
diff --git a/src/Umbraco.Core/Manifest/DataEditorConverter.cs b/src/Umbraco.Core/Manifest/DataEditorConverter.cs
index 20efee1607..86982e17f2 100644
--- a/src/Umbraco.Core/Manifest/DataEditorConverter.cs
+++ b/src/Umbraco.Core/Manifest/DataEditorConverter.cs
@@ -71,7 +71,7 @@ namespace Umbraco.Core.Manifest
if (jobject["editor"] == null)
throw new InvalidOperationException("Missing 'editor' value.");
- // explicitely assign a value editor of type ValueEditor
+ // explicitly assign a value editor of type ValueEditor
// (else the deserializer will try to read it before setting it)
// (and besides it's an interface)
target.ExplicitValueEditor = new DataValueEditor();
@@ -88,7 +88,7 @@ namespace Umbraco.Core.Manifest
if (jobject["prevalues"] is JObject config)
{
- // explicitely assign a configuration editor of type ConfigurationEditor
+ // explicitly assign a configuration editor of type ConfigurationEditor
// (else the deserializer will try to read it before setting it)
// (and besides it's an interface)
target.ExplicitConfigurationEditor = new ConfigurationEditor();
@@ -129,12 +129,12 @@ namespace Umbraco.Core.Manifest
// "config": { "key1": "value1", "key2": "value2" ... }
// }
//
- // the view is at top level, but should be down one level to be propertly
+ // the view is at top level, but should be down one level to be properly
// deserialized as a ParameterValueEditor property -> need to move it
if (jobject.Property("view") != null)
{
- // explicitely assign a value editor of type ParameterValueEditor
+ // explicitly assign a value editor of type ParameterValueEditor
target.ExplicitValueEditor = new DataValueEditor();
// move the 'view' property
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs b/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs
index ee4361d745..98716a42a4 100644
--- a/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs
+++ b/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs
@@ -14,17 +14,17 @@ namespace Umbraco.Core.Migrations.Expressions.Create
public interface ICreateBuilder : IFluentBuilder
{
///
- /// Builds a Create Table expresion, and executes.
+ /// Builds a Create Table expression, and executes.
///
IExecutableBuilder Table(bool withoutKeysAndIndexes = false);
///
- /// Builds a Create Keys and Indexes expresion, and executes.
+ /// Builds a Create Keys and Indexes expression, and executes.
///
IExecutableBuilder KeysAndIndexes();
///
- /// Builds a Create Keys and Indexes expresion, and executes.
+ /// Builds a Create Keys and Indexes expression, and executes.
///
IExecutableBuilder KeysAndIndexes(Type typeOfDto);
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
index 4104ce947c..9c6ff208f8 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
+++ b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
@@ -283,48 +283,60 @@ namespace Umbraco.Core.Migrations.Install
if (string.IsNullOrWhiteSpace(connectionString)) throw new ArgumentNullOrEmptyException(nameof(connectionString));
if (string.IsNullOrWhiteSpace(providerName)) throw new ArgumentNullOrEmptyException(nameof(providerName));
- // set the connection string for the new datalayer
- var connectionStringSettings = new ConnectionStringSettings(Constants.System.UmbracoConnectionName, connectionString, providerName);
+ var fileSource = "web.config";
+ var fileName = IOHelper.MapPath(SystemDirectories.Root +"/" + fileSource);
- var fileName = IOHelper.MapPath($"{SystemDirectories.Root}/web.config");
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
- if (xml.Root == null) throw new Exception("Invalid web.config file.");
- var connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault();
- if (connectionStrings == null) throw new Exception("Invalid web.config file.");
+ if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root).");
- // honour configSource, if its set, change the xml file we are saving the configuration
- // to the one set in the configSource attribute
- if (connectionStrings.Attribute("configSource") != null)
+ var connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault();
+ if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings).");
+
+ // handle configSource
+ var configSourceAttribute = connectionStrings.Attribute("configSource");
+ if (configSourceAttribute != null)
{
- var source = connectionStrings.Attribute("configSource").Value;
- var configFile = IOHelper.MapPath($"{SystemDirectories.Root}/{source}");
- logger.Info("Storing ConnectionString in {ConfigFile}", configFile);
- if (File.Exists(configFile))
- {
- xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
- fileName = configFile;
- }
+ fileSource = configSourceAttribute.Value;
+ fileName = IOHelper.MapPath(SystemDirectories.Root + "/" + fileSource);
+
+ if (!File.Exists(fileName))
+ throw new Exception($"Invalid configSource \"{fileSource}\" (no such file).");
+
+ xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
+ if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root).");
+
connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault();
- if (connectionStrings == null) throw new Exception("Invalid web.config file.");
+ if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings).");
}
- // update connectionString if it exists, or else create a new connectionString
- var setting = connectionStrings.Descendants("add").FirstOrDefault(s => s.Attribute("name").Value == Constants.System.UmbracoConnectionName);
+ // create or update connection string
+ var setting = connectionStrings.Descendants("add").FirstOrDefault(s => s.Attribute("name")?.Value == Constants.System.UmbracoConnectionName);
if (setting == null)
{
connectionStrings.Add(new XElement("add",
new XAttribute("name", Constants.System.UmbracoConnectionName),
- new XAttribute("connectionString", connectionStringSettings),
+ new XAttribute("connectionString", connectionString),
new XAttribute("providerName", providerName)));
}
else
{
- setting.Attribute("connectionString").Value = connectionString;
- setting.Attribute("providerName").Value = providerName;
+ AddOrUpdateAttribute(setting, "connectionString", connectionString);
+ AddOrUpdateAttribute(setting, "providerName", providerName);
}
+ // save
+ logger.Info("Saving connection string to {ConfigFile}.", fileSource);
xml.Save(fileName, SaveOptions.DisableFormatting);
- logger.Info("Configured a new ConnectionString using the '{ProviderName}' provider.", providerName);
+ logger.Info("Saved connection string to {ConfigFile}.", fileSource);
+ }
+
+ private static void AddOrUpdateAttribute(XElement element, string name, string value)
+ {
+ var attribute = element.Attribute(name);
+ if (attribute == null)
+ element.Add(new XAttribute(name, value));
+ else
+ attribute.Value = value;
}
internal bool IsConnectionStringConfigured(ConnectionStringSettings databaseSettings)
@@ -422,7 +434,7 @@ namespace Umbraco.Core.Migrations.Install
_logger.Info("Database configuration status: Started");
var database = scope.Database;
-
+
var message = string.Empty;
var schemaResult = ValidateSchema();
@@ -482,7 +494,7 @@ namespace Umbraco.Core.Migrations.Install
}
_logger.Info("Database upgrade started");
-
+
// upgrade
var upgrader = new UmbracoUpgrader();
upgrader.Execute(_scopeProvider, _migrationBuilder, _keyValueService, _logger, _postMigrations);
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs
index 204e2463de..5cc818a6d2 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs
+++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs
@@ -161,7 +161,7 @@ namespace Umbraco.Core.Migrations.Install
///
///
///
- /// This does not validate any database constraints that are not PKs or FKs because Umbraco does not create a database with non PK/FK contraints.
+ /// This does not validate any database constraints that are not PKs or FKs because Umbraco does not create a database with non PK/FK constraints.
/// Any unique "constraints" in the database are done with unique indexes.
///
private void ValidateDbConstraints(DatabaseSchemaResult result)
@@ -399,7 +399,7 @@ namespace Umbraco.Core.Migrations.Install
/// Creates a new table in the database for the specified .
///
/// Whether the table should be overwritten if it already exists.
- /// The the representing the table.
+ /// The representing the table.
///
///
/// If has been decorated with an , the name from
diff --git a/src/Umbraco.Core/Migrations/MigrationPlan.cs b/src/Umbraco.Core/Migrations/MigrationPlan.cs
index 85d9c1d2cc..9ede9f04f2 100644
--- a/src/Umbraco.Core/Migrations/MigrationPlan.cs
+++ b/src/Umbraco.Core/Migrations/MigrationPlan.cs
@@ -61,7 +61,7 @@ namespace Umbraco.Core.Migrations
// register the target state if we don't know it already
// this is how we keep track of the final state - because
// transitions could be defined in any order, that might
- // be overriden afterwards.
+ // be overridden afterwards.
if (!_transitions.ContainsKey(targetState))
_transitions.Add(targetState, null);
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs
index a73fb8a325..48e6d0085d 100644
--- a/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs
+++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_10_0/RenamePreviewFolder.cs
@@ -5,7 +5,7 @@ using File = System.IO.File;
namespace Umbraco.Core.Migrations.Upgrade.V_7_10_0
{
///
- /// Renames the preview folder containing static html files to ensure it does not interfere with the MVC route
+ /// Renames the preview folder containing static HTML files to ensure it does not interfere with the MVC route
/// that is now supposed to render these views dynamically. We don't want to delete as people may have made
/// customizations to these files that would need to be migrated to the new .cshtml view files.
///
@@ -25,7 +25,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_10_0
{
Directory.Move(previewFolderPath, newPath);
var readmeText =
- $"Static html files used for preview and canvas editing functionality no longer live in this directory.\r\n" +
+ $"Static HTML files used for preview and canvas editing functionality no longer live in this directory.\r\n" +
$"Instead they have been recreated as MVC views and can now be found in '~/Umbraco/Views/Preview'.\r\n" +
$"See issue: http://issues.umbraco.org/issue/U4-11090";
File.WriteAllText(Path.Combine(newPath, "readme.txt"), readmeText);
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs
index 17dd060376..9042ae105e 100644
--- a/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs
+++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_6_0/AddIndexesToUmbracoRelationTables.cs
@@ -18,7 +18,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoRelation_parentChildType")) == false)
{
//This will remove any corrupt/duplicate data in the relation table before the index is applied
- //Ensure this executes in a defered block which will be done inside of the migration transaction
+ //Ensure this executes in a deferred block which will be done inside of the migration transaction
var database = Database;
//We need to check if this index has corrupted data and then clear that data
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs
index f5fdd8df2b..edd78e6c84 100644
--- a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs
+++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/AddUserGroupTables.cs
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
var constraints = SqlSyntax.GetConstraintsPerColumn(Context.Database).Distinct().ToArray();
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
- //In some very rare cases, there might alraedy be user group tables that we'll need to remove first
+ //In some very rare cases, there might already be user group tables that we'll need to remove first
//but of course we don't want to remove the tables we will be creating below if they already exist so
//need to do some checks first since these old rare tables have a different schema
RemoveOldTablesIfExist(tables, columns);
@@ -83,7 +83,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
}
///
- /// In some very rare cases, there might alraedy be user group tables that we'll need to remove first
+ /// In some very rare cases, there might already be user group tables that we'll need to remove first
/// but of course we don't want to remove the tables we will be creating below if they already exist so
/// need to do some checks first since these old rare tables have a different schema
///
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs
index 3714427cd7..509b3f91dd 100644
--- a/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs
+++ b/src/Umbraco.Core/Migrations/Upgrade/V_7_7_0/UpdateUserTables.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
public override void Migrate()
{
- //Don't exeucte if the column is already there
+ //Don't execute if the column is already there
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("createDate")) == false)
diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs
index 2128dc9d78..0d4e9ce789 100644
--- a/src/Umbraco.Core/Models/ContentBase.cs
+++ b/src/Umbraco.Core/Models/ContentBase.cs
@@ -391,7 +391,7 @@ namespace Umbraco.Core.Models
#region Dirty
///
- /// Overriden to include user properties.
+ /// Overridden to include user properties.
public override void ResetDirtyProperties(bool rememberDirty)
{
base.ResetDirtyProperties(rememberDirty);
@@ -408,14 +408,14 @@ namespace Umbraco.Core.Models
}
///
- /// Overriden to include user properties.
+ /// Overridden to include user properties.
public override bool IsDirty()
{
return IsEntityDirty() || this.IsAnyUserPropertyDirty();
}
///
- /// Overriden to include user properties.
+ /// Overridden to include user properties.
public override bool WasDirty()
{
return WasEntityDirty() || this.WasAnyUserPropertyDirty();
@@ -438,7 +438,7 @@ namespace Umbraco.Core.Models
}
///
- /// Overriden to include user properties.
+ /// Overridden to include user properties.
public override bool IsPropertyDirty(string propertyName)
{
if (base.IsPropertyDirty(propertyName))
@@ -448,7 +448,7 @@ namespace Umbraco.Core.Models
}
///
- /// Overriden to include user properties.
+ /// Overridden to include user properties.
public override bool WasPropertyDirty(string propertyName)
{
if (base.WasPropertyDirty(propertyName))
@@ -458,7 +458,7 @@ namespace Umbraco.Core.Models
}
///
- /// Overriden to include user properties.
+ /// Overridden to include user properties.
public override IEnumerable GetDirtyProperties()
{
var instanceProperties = base.GetDirtyProperties();
@@ -467,7 +467,7 @@ namespace Umbraco.Core.Models
}
///
- /// Overriden to include user properties.
+ /// Overridden to include user properties.
public override IEnumerable GetWereDirtyProperties()
{
var instanceProperties = base.GetWereDirtyProperties();
@@ -479,7 +479,7 @@ namespace Umbraco.Core.Models
///
///
- /// Overriden to deal with specific object instances
+ /// Overridden to deal with specific object instances
///
protected override void PerformDeepClone(object clone)
{
diff --git a/src/Umbraco.Core/Models/DeepCloneHelper.cs b/src/Umbraco.Core/Models/DeepCloneHelper.cs
index 44a714c2c1..6470de912b 100644
--- a/src/Umbraco.Core/Models/DeepCloneHelper.cs
+++ b/src/Umbraco.Core/Models/DeepCloneHelper.cs
@@ -91,7 +91,7 @@ namespace Umbraco.Core.Models
|| (propertyInfo.PropertyType.IsInterface && propertyInfo.PropertyType.IsGenericType == false))
{
//if its an array, we'll create a list to work with first and then convert to array later
- //otherwise if its just a regular derivitave of IEnumerable, we can use a list too
+ //otherwise if its just a regular derivative of IEnumerable, we can use a list too
return new ClonePropertyInfo(propertyInfo) { GenericListType = typeof(List
IDictionary AdditionalData { get; }
///
diff --git a/src/Umbraco.Core/Models/IContentTypeBase.cs b/src/Umbraco.Core/Models/IContentTypeBase.cs
index 787e347b37..aea84d9767 100644
--- a/src/Umbraco.Core/Models/IContentTypeBase.cs
+++ b/src/Umbraco.Core/Models/IContentTypeBase.cs
@@ -68,7 +68,7 @@ namespace Umbraco.Core.Models
///
/// The culture.
/// The segment.
- /// A value indicating whether wilcards are supported.
+ /// A value indicating whether wildcard are supported.
/// True if the combination is valid; otherwise false.
///
/// The combination must match the content type variation exactly. For instance, if the content type varies by culture,
@@ -81,7 +81,7 @@ namespace Umbraco.Core.Models
///
/// The culture.
/// The segment.
- /// A value indicating whether wilcards are supported.
+ /// A value indicating whether wildcard are supported.
/// True if the combination is valid; otherwise false.
///
/// The combination must be valid for properties of the content type. For instance, if the content type varies by culture,
diff --git a/src/Umbraco.Core/Models/IContentTypeComposition.cs b/src/Umbraco.Core/Models/IContentTypeComposition.cs
index 3113f795cd..84e436e46f 100644
--- a/src/Umbraco.Core/Models/IContentTypeComposition.cs
+++ b/src/Umbraco.Core/Models/IContentTypeComposition.cs
@@ -31,7 +31,7 @@ namespace Umbraco.Core.Models
bool AddContentType(IContentTypeComposition contentType);
///
- /// Removes a ContentType with the supplied alias from the the list of composite ContentTypes
+ /// Removes a ContentType with the supplied alias from the list of composite ContentTypes
///
/// Alias of a
/// True if ContentType was removed, otherwise returns False
diff --git a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs
index 13a13e9dff..d118cd526e 100644
--- a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs
+++ b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs
@@ -95,7 +95,7 @@ namespace Umbraco.Core.Models.Identity
}
///
- /// Returns true if an Id has been set on this object this will be false if the object is new and not peristed to the database
+ /// Returns true if an Id has been set on this object this will be false if the object is new and not persisted to the database
///
public bool HasIdentity => _hasIdentity;
diff --git a/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs b/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs
index 198f87cf21..276f601771 100644
--- a/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs
+++ b/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Models.Identity
public interface IIdentityUserLogin : IEntity, IRememberBeingDirty
{
///
- /// The login provider for the login (i.e. facebook, google)
+ /// The login provider for the login (i.e. Facebook, Google)
///
///
string LoginProvider { get; set; }
diff --git a/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs b/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs
index 28a9fe2f15..5876f420b4 100644
--- a/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs
+++ b/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs
@@ -4,7 +4,7 @@ using Umbraco.Core.Models.Entities;
namespace Umbraco.Core.Models.Identity
{
///
- /// Entity type for a user's login (i.e. facebook, google)
+ /// Entity type for a user's login (i.e. Facebook, Google)
///
///
public class IdentityUserLogin : EntityBase, IIdentityUserLogin
@@ -26,7 +26,7 @@ namespace Umbraco.Core.Models.Identity
}
///
- /// The login provider for the login (i.e. facebook, google)
+ /// The login provider for the login (i.e. Facebook, Google)
///
///
public string LoginProvider { get; set; }
diff --git a/src/Umbraco.Core/Models/Media.cs b/src/Umbraco.Core/Models/Media.cs
index 9c13a22caa..a0f3aa35de 100644
--- a/src/Umbraco.Core/Models/Media.cs
+++ b/src/Umbraco.Core/Models/Media.cs
@@ -15,7 +15,7 @@ namespace Umbraco.Core.Models
///
/// Constructor for creating a Media object
///
- /// ame of the Media object
+ /// name of the Media object
/// Parent object
/// MediaType for the current Media object
public Media(string name, IMedia parent, IMediaType contentType)
@@ -25,7 +25,7 @@ namespace Umbraco.Core.Models
///
/// Constructor for creating a Media object
///
- /// ame of the Media object
+ /// name of the Media object
/// Parent object
/// MediaType for the current Media object
/// Collection of properties
@@ -38,7 +38,7 @@ namespace Umbraco.Core.Models
///
/// Constructor for creating a Media object
///
- /// ame of the Media object
+ /// name of the Media object
/// Id of the Parent IMedia
/// MediaType for the current Media object
public Media(string name, int parentId, IMediaType contentType)
diff --git a/src/Umbraco.Core/Models/MediaExtensions.cs b/src/Umbraco.Core/Models/MediaExtensions.cs
index 5cc4cc8fe5..2945856817 100644
--- a/src/Umbraco.Core/Models/MediaExtensions.cs
+++ b/src/Umbraco.Core/Models/MediaExtensions.cs
@@ -46,7 +46,7 @@ namespace Umbraco.Core.Models
}
}
- // hrm, without knowing what it is, just adding a string here might not be very nice
+ // Without knowing what it is, just adding a string here might not be very nice
return string.Empty;
}
diff --git a/src/Umbraco.Core/Models/Member.cs b/src/Umbraco.Core/Models/Member.cs
index 38927898cf..c47f68c930 100644
--- a/src/Umbraco.Core/Models/Member.cs
+++ b/src/Umbraco.Core/Models/Member.cs
@@ -226,7 +226,7 @@ namespace Umbraco.Core.Models
/// Gets or sets the raw password answer value
///
///
- /// For security reasons this value should be encrypted, the encryption process is handled by the memberhip provider
+ /// For security reasons this value should be encrypted, the encryption process is handled by the membership provider
/// Alias: umbracoMemberPasswordRetrievalAnswer
///
/// Part of the standard properties collection.
diff --git a/src/Umbraco.Core/Models/Membership/IProfile.cs b/src/Umbraco.Core/Models/Membership/IProfile.cs
index 335faa6c11..7da095bb14 100644
--- a/src/Umbraco.Core/Models/Membership/IProfile.cs
+++ b/src/Umbraco.Core/Models/Membership/IProfile.cs
@@ -1,7 +1,7 @@
namespace Umbraco.Core.Models.Membership
{
///
- /// Defines the the User Profile interface
+ /// Defines the User Profile interface
///
public interface IProfile
{
diff --git a/src/Umbraco.Core/Models/Membership/UserGroup.cs b/src/Umbraco.Core/Models/Membership/UserGroup.cs
index db21c78438..e3e812f4c1 100644
--- a/src/Umbraco.Core/Models/Membership/UserGroup.cs
+++ b/src/Umbraco.Core/Models/Membership/UserGroup.cs
@@ -24,7 +24,7 @@ namespace Umbraco.Core.Models.Membership
private static readonly Lazy Ps = new Lazy();
- // ReSharper disable once ClassNeverInstantiated.Local // lazy-instanciated in Ps
+ // ReSharper disable once ClassNeverInstantiated.Local // lazy-instantiated in Ps
private class PropertySelectors
{
public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo(x => x.Name);
diff --git a/src/Umbraco.Core/Models/ObjectTypes.cs b/src/Umbraco.Core/Models/ObjectTypes.cs
index 2eb4d70a3a..dd943ee02b 100644
--- a/src/Umbraco.Core/Models/ObjectTypes.cs
+++ b/src/Umbraco.Core/Models/ObjectTypes.cs
@@ -76,7 +76,7 @@ namespace Umbraco.Core.Models
}
///
- /// Gets the Clr type corresponding to an object type Guid.
+ /// Gets the CLR type corresponding to an object type Guid.
///
public static Type GetClrType(Guid objectType)
{
@@ -145,7 +145,7 @@ namespace Umbraco.Core.Models
}
///
- /// Gets the Clr type corresponding to this Umbraco object type.
+ /// Gets the CLR type corresponding to this Umbraco object type.
///
public static Type GetClrType(this UmbracoObjectTypes objectType)
{
diff --git a/src/Umbraco.Core/Models/PropertyGroupCollection.cs b/src/Umbraco.Core/Models/PropertyGroupCollection.cs
index 8b493e3118..5fe47b52a4 100644
--- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs
+++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs
@@ -74,7 +74,7 @@ namespace Umbraco.Core.Models
{
_addLocker.EnterWriteLock();
- //Note this is done to ensure existig groups can be renamed
+ //Note this is done to ensure existing groups can be renamed
if (item.HasIdentity && item.Id > 0)
{
var exists = Contains(item.Id);
diff --git a/src/Umbraco.Core/Models/PropertyType.cs b/src/Umbraco.Core/Models/PropertyType.cs
index 6373dbec9a..377e86d2e5 100644
--- a/src/Umbraco.Core/Models/PropertyType.cs
+++ b/src/Umbraco.Core/Models/PropertyType.cs
@@ -287,7 +287,7 @@ namespace Umbraco.Core.Models
/// Converts a value assigned to a property.
///
///
- /// The input value can be pretty much anything, and is converted to the actual Clr type
+ /// The input value can be pretty much anything, and is converted to the actual CLR type
/// expected by the property (eg an integer if the property values are integers).
/// Throws if the value cannot be converted.
///
@@ -345,7 +345,7 @@ namespace Umbraco.Core.Models
var convDecimal = value.TryConvertTo();
if (convDecimal)
{
- // need to normalize the value (change the scaling factor and remove trailing zeroes)
+ // need to normalize the value (change the scaling factor and remove trailing zeros)
// because the underlying database is going to mess with the scaling factor anyways.
converted = convDecimal.Result.Normalize();
return true;
diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs
index c5fa0330f2..e50fb2c396 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs
@@ -153,8 +153,12 @@ namespace Umbraco.Core.Models.PublishedContent
///
bool IsDraft(string culture = null);
- // fixme/task - consider having an IsPublished flag too
- // so that when IsDraft is true, we can check whether there is a published version?
+ ///
+ /// Gets a value indicating whether the content is published.
+ ///
+ ///
+ bool IsPublished(string culture = null);
+
#endregion
diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs
index 25d9643bed..ae4caf352e 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs
@@ -24,10 +24,10 @@ namespace Umbraco.Core.Models.PublishedContent
IList CreateModelList(string alias);
///
- /// Maps a Clr type that may contain model types, to an actual Clr type.
+ /// Maps a CLR type that may contain model types, to an actual CLR type.
///
- /// The Clr type.
- /// The actual Clr type.
+ /// The CLR type.
+ /// The actual CLR type.
/// See for more details.
Type MapModelType(Type type);
}
diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
index cfab82213a..9a00e94d3e 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
@@ -29,7 +29,7 @@
/// Gets the source value of the property.
///
///
- /// The source value is whatever was passed to the property when it was instanciated, and it is
+ /// The source value is whatever was passed to the property when it was instantiated, and it is
/// somewhat implementation-dependent -- depending on how the IPublishedCache is implemented.
/// The XmlPublishedCache source values are strings exclusively since they come from the Xml cache.
/// For other caches that get their source value from the database, it would be either a string,
diff --git a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs
index a366742cc5..540abda2c5 100644
--- a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Core.Models.PublishedContent
{
///
///
- /// Represents the Clr type of a model.
+ /// Represents the CLR type of a model.
///
///
/// ModelType.For("alias")
@@ -43,11 +43,11 @@ namespace Umbraco.Core.Models.PublishedContent
=> new ModelType(alias);
///
- /// Gets the actual Clr type by replacing model types, if any.
+ /// Gets the actual CLR type by replacing model types, if any.
///
/// The type.
/// The model types map.
- /// The actual Clr type.
+ /// The actual CLR type.
public static Type Map(Type type, Dictionary modelTypes)
=> Map(type, modelTypes, false);
@@ -82,11 +82,11 @@ namespace Umbraco.Core.Models.PublishedContent
}
///
- /// Gets the actual Clr type name by replacing model types, if any.
+ /// Gets the actual CLR type name by replacing model types, if any.
///
/// The type.
/// The model types map.
- /// The actual Clr type name.
+ /// The actual CLR type name.
public static string MapToName(Type type, Dictionary map)
=> MapToName(type, map, false);
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs
index cb4463fa6f..083e8dcc6e 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs
@@ -20,7 +20,7 @@ namespace Umbraco.Core.Models.PublishedContent
/// Initializes a new instance of the class with a content type.
///
public PublishedContentType(IContentTypeComposition contentType, IPublishedContentTypeFactory factory)
- : this(contentType.Id, contentType.Alias, contentType.GetItemType(), contentType.CompositionAliases(), contentType.Variations)
+ : this(contentType.Id, contentType.Alias, contentType.GetItemType(), contentType.CompositionAliases(), contentType.Variations, contentType.IsElement)
{
var propertyTypes = contentType.CompositionPropertyTypes
.Select(x => factory.CreatePropertyType(this, x))
@@ -31,8 +31,6 @@ namespace Umbraco.Core.Models.PublishedContent
_propertyTypes = propertyTypes.ToArray();
- IsElement = contentType.IsElement;
-
InitializeIndexes();
}
@@ -43,8 +41,8 @@ namespace Umbraco.Core.Models.PublishedContent
/// This constructor is for tests and is not intended to be used directly from application code.
/// Values are assumed to be consisted and are not checked.
///
- public PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations)
- : this (id, alias, itemType, compositionAliases, variations)
+ public PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations, bool isElement = false)
+ : this (id, alias, itemType, compositionAliases, variations, isElement)
{
var propertyTypesA = propertyTypes.ToArray();
foreach (var propertyType in propertyTypesA)
@@ -54,13 +52,14 @@ namespace Umbraco.Core.Models.PublishedContent
InitializeIndexes();
}
- private PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, ContentVariation variations)
+ private PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, ContentVariation variations, bool isElement)
{
Id = id;
Alias = alias;
ItemType = itemType;
CompositionAliases = new HashSet(compositionAliases, StringComparer.InvariantCultureIgnoreCase);
Variations = variations;
+ IsElement = isElement;
}
private void InitializeIndexes()
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs
index efb39ba844..abf4156d7f 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs
@@ -32,15 +32,15 @@ namespace Umbraco.Core.Models.PublishedContent
}
// for tests
- internal PublishedContentType CreateContentType(int id, string alias, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing)
+ internal PublishedContentType CreateContentType(int id, string alias, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing, bool isElement = false)
{
- return new PublishedContentType(id, alias, PublishedItemType.Content, Enumerable.Empty(), propertyTypes, variations);
+ return new PublishedContentType(id, alias, PublishedItemType.Content, Enumerable.Empty(), propertyTypes, variations, isElement);
}
// for tests
- internal PublishedContentType CreateContentType(int id, string alias, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing)
+ internal PublishedContentType CreateContentType(int id, string alias, IEnumerable compositionAliases, IEnumerable propertyTypes, ContentVariation variations = ContentVariation.Nothing, bool isElement = false)
{
- return new PublishedContentType(id, alias, PublishedItemType.Content, compositionAliases, propertyTypes, variations);
+ return new PublishedContentType(id, alias, PublishedItemType.Content, compositionAliases, propertyTypes, variations, isElement);
}
///
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs
index 36755c8944..42ff16bae5 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs
@@ -111,6 +111,10 @@ namespace Umbraco.Core.Models.PublishedContent
///
public virtual bool IsDraft(string culture = null) => _content.IsDraft(culture);
+ ///
+ public virtual bool IsPublished(string culture = null) => _content.IsPublished(culture);
+
+
#endregion
#region Tree
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs
index f3f10e63e2..566319ab74 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs
@@ -31,7 +31,7 @@ namespace Umbraco.Core.Models.PublishedContent
public int Id { get; }
///
- /// Gets the dat type editor alias.
+ /// Gets the data type editor alias.
///
public string EditorAlias { get; }
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
index 1a99076b2c..0860fdb822 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
@@ -283,11 +283,11 @@ namespace Umbraco.Core.Models.PublishedContent
}
///
- /// Gets the property model Clr type.
+ /// Gets the property model CLR type.
///
///
- /// The model Clr type may be a type, or may contain types.
- /// For the actual Clr type, see .
+ /// The model CLR type may be a type, or may contain types.
+ /// For the actual CLR type, see .
///
public Type ModelClrType
{
@@ -299,12 +299,12 @@ namespace Umbraco.Core.Models.PublishedContent
}
///
- /// Gets the property Clr type.
+ /// Gets the property CLR type.
///
///
- /// Returns the actual Clr type which does not contain types.
+ /// Returns the actual CLR type which does not contain types.
/// Mapping from may throw if some instances
- /// could not be mapped to actual Clr types.
+ /// could not be mapped to actual CLR types.
///
public Type ClrType
{
diff --git a/src/Umbraco.Core/Models/ServerRegistration.cs b/src/Umbraco.Core/Models/ServerRegistration.cs
index 0e135f34d6..db0e9b8c3b 100644
--- a/src/Umbraco.Core/Models/ServerRegistration.cs
+++ b/src/Umbraco.Core/Models/ServerRegistration.cs
@@ -26,13 +26,13 @@ namespace Umbraco.Core.Models
}
///
- /// Initialiazes a new instance of the class.
+ /// Initializes a new instance of the class.
///
public ServerRegistration()
{ }
///
- /// Initialiazes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The unique id of the server registration.
/// The server url.
@@ -54,7 +54,7 @@ namespace Umbraco.Core.Models
}
///
- /// Initialiazes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The server url.
/// The unique server identity.
diff --git a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs
index ff080f2cc1..6f7272beee 100644
--- a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs
+++ b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs
@@ -5,7 +5,7 @@ using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.Models
{
///
- /// Enum used to represent the Umbraco Object Types and thier associated GUIDs
+ /// Enum used to represent the Umbraco Object Types and their associated GUIDs
///
public enum UmbracoObjectTypes
{
diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs
index 19726cc5a5..e14d7ee2de 100644
--- a/src/Umbraco.Core/Models/UserExtensions.cs
+++ b/src/Umbraco.Core/Models/UserExtensions.cs
@@ -47,7 +47,7 @@ namespace Umbraco.Core.Models
}
///
- /// Tries to lookup the user's gravatar to see if the endpoint can be reached, if so it returns the valid URL
+ /// Tries to lookup the user's Gravatar to see if the endpoint can be reached, if so it returns the valid URL
///
///
///
@@ -59,7 +59,7 @@ namespace Umbraco.Core.Models
// If FIPS is required, never check the Gravatar service as it only supports MD5 hashing.
// Unfortunately, if the FIPS setting is enabled on Windows, using MD5 will throw an exception
// and the website will not run.
- // Also, check if the user has explicitly removed all avatars including a gravatar, this will be possible and the value will be "none"
+ // Also, check if the user has explicitly removed all avatars including a Gravatar, this will be possible and the value will be "none"
if (user.Avatar == "none" || CryptoConfig.AllowOnlyFipsAlgorithms)
{
return new string[0];
@@ -70,7 +70,7 @@ namespace Umbraco.Core.Models
var gravatarHash = user.Email.ToMd5();
var gravatarUrl = "https://www.gravatar.com/avatar/" + gravatarHash + "?d=404";
- //try gravatar
+ //try Gravatar
var gravatarAccess = cache.GetCacheItem("UserAvatar" + user.Id, () =>
{
// Test if we can reach this URL, will fail when there's network or firewall errors
diff --git a/src/Umbraco.Core/NetworkHelper.cs b/src/Umbraco.Core/NetworkHelper.cs
index 8f310ccf0c..8f7c7c1eb8 100644
--- a/src/Umbraco.Core/NetworkHelper.cs
+++ b/src/Umbraco.Core/NetworkHelper.cs
@@ -38,7 +38,7 @@ namespace Umbraco.Core
catch
{
//if we get here it means we cannot access the machine name
- throw new ApplicationException("Cannot resolve the current machine name eithe by Environment.MachineName or by Dns.GetHostname()");
+ throw new ApplicationException("Cannot resolve the current machine name either by Environment.MachineName or by Dns.GetHostname()");
}
}
}
diff --git a/src/Umbraco.Core/ObjectExtensions.cs b/src/Umbraco.Core/ObjectExtensions.cs
index 1bc2fb48a5..1a66cb96fb 100644
--- a/src/Umbraco.Core/ObjectExtensions.cs
+++ b/src/Umbraco.Core/ObjectExtensions.cs
@@ -153,7 +153,7 @@ namespace Umbraco.Core
// Recursively call into this method with the inner (not-nullable) type and handle the outcome
var inner = input.TryConvertTo(underlying);
- // And if sucessful, fall on through to rewrap in a nullable; if failed, pass on the exception
+ // And if successful, fall on through to rewrap in a nullable; if failed, pass on the exception
if (inner.Success)
{
input = inner.Result; // Now fall on through...
@@ -216,7 +216,7 @@ namespace Umbraco.Core
return Attempt.Succeed(input);
}
- // Re-check convertables since we altered the input through recursion
+ // Re-check convertibles since we altered the input through recursion
if (input is IConvertible convertible2)
{
return Attempt.Succeed(Convert.ChangeType(convertible2, target));
@@ -391,7 +391,7 @@ namespace Umbraco.Core
}
internal static void CheckThrowObjectDisposed(this IDisposable disposable, bool isDisposed, string objectname)
{
- //TODO: Localise this exception
+ //TODO: Localize this exception
if (isDisposed)
throw new ObjectDisposedException(objectname);
}
diff --git a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs
index 9e6339178e..8dccf73814 100644
--- a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs
+++ b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs
@@ -153,7 +153,7 @@ namespace Umbraco.Core.Packaging
{
if (actionsElement == null) return Enumerable.Empty();
- //invariant check ... because people can realy enter anything :/
+ //invariant check ... because people can really enter anything :/
if (!string.Equals("actions", actionsElement.Name.LocalName, StringComparison.InvariantCultureIgnoreCase))
throw new FormatException("Must be \"\" as root");
@@ -161,7 +161,7 @@ namespace Umbraco.Core.Packaging
var actionElementName = actionsElement.Elements().First().Name.LocalName;
- //invariant check ... because people can realy enter anything :/
+ //invariant check ... because people can really enter anything :/
if (!string.Equals("action", actionElementName, StringComparison.InvariantCultureIgnoreCase))
throw new FormatException("Must be \"
- /// This will run the uninstallation sequence for this
+ /// This will run the uninstall sequence for this
///
///
///
diff --git a/src/Umbraco.Core/Packaging/PackageActionRunner.cs b/src/Umbraco.Core/Packaging/PackageActionRunner.cs
index 38275d5f0a..dba2690c0c 100644
--- a/src/Umbraco.Core/Packaging/PackageActionRunner.cs
+++ b/src/Umbraco.Core/Packaging/PackageActionRunner.cs
@@ -7,7 +7,7 @@ using Umbraco.Core._Legacy.PackageActions;
namespace Umbraco.Core.Packaging
{
///
- /// Package actions are executed on packge install / uninstall.
+ /// Package actions are executed on package install / uninstall.
///
internal class PackageActionRunner : IPackageActionRunner
{
diff --git a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs
index 9bea527b91..72dc0cb325 100644
--- a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs
+++ b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs
@@ -182,7 +182,7 @@ namespace Umbraco.Core.Packaging
/// Optional parent Id for the content being imported
/// A dictionary of already imported document types (basically used as a cache)
/// Optional Id of the user performing the import
- /// An enumrable list of generated content
+ /// An enumerable list of generated content
public IEnumerable ImportContent(CompiledPackageDocument packageDocument, int parentId, IDictionary importedDocumentTypes, int userId)
{
var element = packageDocument.XmlData;
@@ -343,7 +343,7 @@ namespace Umbraco.Core.Packaging
///
/// Xml to import
/// Optional id of the User performing the operation. Default is zero (admin).
- /// An enumrable list of generated ContentTypes
+ /// An enumerable list of generated ContentTypes
public IEnumerable ImportDocumentTypes(IEnumerable docTypeElements, int userId)
{
return ImportDocumentTypes(docTypeElements.ToList(), true, userId);
@@ -355,12 +355,12 @@ namespace Umbraco.Core.Packaging
/// Xml to import
/// Boolean indicating whether or not to import the
/// Optional id of the User performing the operation. Default is zero (admin).
- /// An enumrable list of generated ContentTypes
+ /// An enumerable list of generated ContentTypes
public IEnumerable ImportDocumentTypes(IReadOnlyCollection unsortedDocumentTypes, bool importStructure, int userId)
{
var importedContentTypes = new Dictionary();
- //When you are importing a single doc type we have to assume that the depedencies are already there.
+ //When you are importing a single doc type we have to assume that the dependencies are already there.
//Otherwise something like uSync won't work.
var graph = new TopoGraph>(x => x.Key, x => x.Dependencies);
var isSingleDocTypeImport = unsortedDocumentTypes.Count == 1;
@@ -437,7 +437,7 @@ namespace Umbraco.Core.Packaging
if (importStructure)
{
var updatedContentTypes = new List();
- //Update the structure here - we can't do it untill all DocTypes have been created
+ //Update the structure here - we can't do it until all DocTypes have been created
foreach (var documentType in documentTypes)
{
var alias = documentType.Element("Info").Element("Alias").Value;
@@ -796,7 +796,7 @@ namespace Umbraco.Core.Packaging
///
/// Xml to import
/// Optional id of the user
- /// An enumrable list of generated DataTypeDefinitions
+ /// An enumerable list of generated DataTypeDefinitions
public IEnumerable ImportDataTypes(IReadOnlyCollection dataTypeElements, int userId)
{
var dataTypes = new List();
@@ -815,7 +815,7 @@ namespace Umbraco.Core.Packaging
parentId = importedFolders[dataTypeDefinitionName];
var definition = _dataTypeService.GetDataType(dataTypeDefinitionId);
- //If the datatypedefinition doesn't already exist we create a new new according to the one in the package xml
+ //If the datatype definition doesn't already exist we create a new according to the one in the package xml
if (definition == null)
{
var databaseType = databaseTypeAttribute?.Value.EnumParse(true) ?? ValueStorageType.Ntext;
@@ -1195,7 +1195,7 @@ namespace Umbraco.Core.Packaging
///
/// Xml to import
/// Optional user id
- /// An enumrable list of generated Templates
+ /// An enumerable list of generated Templates
public IEnumerable ImportTemplates(IReadOnlyCollection templateElements, int userId)
{
var templates = new List();
diff --git a/src/Umbraco.Core/Packaging/PackageExtraction.cs b/src/Umbraco.Core/Packaging/PackageExtraction.cs
index 48093da45f..d3150f4409 100644
--- a/src/Umbraco.Core/Packaging/PackageExtraction.cs
+++ b/src/Umbraco.Core/Packaging/PackageExtraction.cs
@@ -56,7 +56,7 @@ namespace Umbraco.Core.Packaging
// Check if the file is a valid package
if (alowedExtension.All(ae => ae.InvariantEquals(extension) == false))
{
- throw new ArgumentException("Error - file isn't a package. only extentions: \"{string.Join(", ", alowedExtension)}\" is allowed");
+ throw new ArgumentException("Error - file isn't a package. only extensions: \"{string.Join(", ", alowedExtension)}\" is allowed");
}
}
diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs
index 1df232f62d..dcf3b62e55 100644
--- a/src/Umbraco.Core/Packaging/PackagesRepository.cs
+++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs
@@ -505,7 +505,7 @@ namespace Umbraco.Core.Packaging
/// Converts a umbraco stylesheet to a package xml node
///
/// The name of the stylesheet.
- /// if set to true [incluce properties].
+ /// if set to true [include properties].
///
private XElement GetStylesheetXml(string name, bool includeProperties)
{
diff --git a/src/Umbraco.Core/Persistence/BulkDataReader.cs b/src/Umbraco.Core/Persistence/BulkDataReader.cs
index 6ede6a1859..1eaa88ee88 100644
--- a/src/Umbraco.Core/Persistence/BulkDataReader.cs
+++ b/src/Umbraco.Core/Persistence/BulkDataReader.cs
@@ -160,7 +160,7 @@ namespace Umbraco.Core.Persistence
/// A helper method to support .
///
///
- /// This methds does extensive argument checks. These errors will cause hard to diagnose exceptions in latter
+ /// This methods does extensive argument checks. These errors will cause hard to diagnose exceptions in latter
/// processing so it is important to detect them when they can be easily associated with the code defect.
///
///
diff --git a/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs b/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs
index 35cb4a8087..fceb32d609 100644
--- a/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs
+++ b/src/Umbraco.Core/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs
@@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.DatabaseAnnotations
internal string OnUpdate { get; set; }
///
- /// Gets or sets the name of the foreign key refence
+ /// Gets or sets the name of the foreign key reference
///
///
/// Overrides the default naming of a foreign key reference:
diff --git a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs
index f447d6a560..3c6915dc34 100644
--- a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs
+++ b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs
@@ -3,7 +3,7 @@
namespace Umbraco.Core.Persistence.DatabaseModelDefinitions
{
///
- /// Represents a database index definition retreived by querying the database
+ /// Represents a database index definition retrieved by querying the database
///
internal class DbIndexDefinition
{
diff --git a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs
index 7548574735..97e172f98f 100644
--- a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs
+++ b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs
@@ -187,7 +187,7 @@ namespace Umbraco.Core.Persistence.Factories
}
///
- /// Buils a dto from an IMedia item.
+ /// Builds a dto from an IMedia item.
///
public static MediaDto BuildDto(IMedia entity)
{
@@ -204,7 +204,7 @@ namespace Umbraco.Core.Persistence.Factories
}
///
- /// Buils a dto from an IMember item.
+ /// Builds a dto from an IMember item.
///
public static MemberDto BuildDto(IMember entity)
{
diff --git a/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs b/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs
index cbbcb03649..8e3c7db3b0 100644
--- a/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs
+++ b/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs
@@ -43,7 +43,7 @@ namespace Umbraco.Core.Persistence.Factories
var propertyTypes = GetPropertyTypes(dto, memberType, standardPropertyTypes);
- //By Convention we add 9 stnd PropertyTypes - This is only here to support loading of types that didn't have these conventions before.
+ //By Convention we add 9 standard PropertyTypes - This is only here to support loading of types that didn't have these conventions before.
foreach (var standardPropertyType in standardPropertyTypes)
{
if (dto.PropertyTypes.Any(x => x.Alias.Equals(standardPropertyType.Key))) continue;
diff --git a/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs b/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs
index 83b1ffa792..d83650d798 100644
--- a/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs
+++ b/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs
@@ -104,7 +104,7 @@ namespace Umbraco.Core.Persistence.Factories
/// The properties to map
///
/// out parameter indicating that one or more properties have been edited
- /// out parameter containing a collection of of edited cultures when the contentVariation varies by culture
+ /// out parameter containing a collection of edited cultures when the contentVariation varies by culture
///
public static IEnumerable BuildDtos(ContentVariation contentVariation, int currentVersionId, int publishedVersionId, IEnumerable properties,
ILanguageRepository languageRepository, out bool edited, out HashSet editedCultures)
diff --git a/src/Umbraco.Core/Persistence/LocalDb.cs b/src/Umbraco.Core/Persistence/LocalDb.cs
index 11fa52fa48..94e930abe9 100644
--- a/src/Umbraco.Core/Persistence/LocalDb.cs
+++ b/src/Umbraco.Core/Persistence/LocalDb.cs
@@ -275,7 +275,7 @@ namespace Umbraco.Core.Persistence
///
/// The database should not exist in the LocalDb instance.
/// It will be attached with its name being its MDF filename (full path), uppercased, when
- /// the first connection is opened, and remain attached until explicitely detached.
+ /// the first connection is opened, and remain attached until explicitly detached.
///
public string GetAttachedConnectionString(string databaseName, string filesPath)
{
diff --git a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs
index 119c11c6ca..10735f865c 100644
--- a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs
+++ b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs
@@ -816,7 +816,7 @@ namespace Umbraco.Core.Persistence
///
/// The type of the Dto to select.
/// The origin Sql.
- /// An expression speficying the reference.
+ /// An expression specifying the reference.
/// An expression to apply to the Sql statement before adding the reference selection.
/// The Sql statement.
/// The expression applies to the Sql statement before the reference selection
diff --git a/src/Umbraco.Core/Persistence/PocoDataDataReader.cs b/src/Umbraco.Core/Persistence/PocoDataDataReader.cs
index 7bfc31f66c..1d7d301b87 100644
--- a/src/Umbraco.Core/Persistence/PocoDataDataReader.cs
+++ b/src/Umbraco.Core/Persistence/PocoDataDataReader.cs
@@ -90,7 +90,7 @@ namespace Umbraco.Core.Persistence
}
else
{
- //get the SqlDbType from the clr type
+ //get the SqlDbType from the CLR type
sqlDbType = _sqlSyntaxProvider.GetSqlDbType(col.PropertyType);
}
diff --git a/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs
index cc9b86c56b..69b0698a96 100644
--- a/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs
@@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.Repositories
///
/// The original alias.
/// The original alias with a number appended to it, so that it is unique.
- /// Unique accross all content, media and member types.
+ /// Unique across all content, media and member types.
string GetUniqueAlias(string alias);
diff --git a/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs
index fd83ffdfcc..b360f9b1a5 100644
--- a/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs
@@ -1,6 +1,6 @@
namespace Umbraco.Core.Persistence.Repositories
{
- // this only exists to differenciate with IPartialViewRepository in IoC
+ // this only exists to differentiate with IPartialViewRepository in IoC
// without resorting to constants, names, whatever - and IPartialViewRepository
// is implemented by PartialViewRepository and IPartialViewMacroRepository by
// PartialViewMacroRepository - just to inject the proper filesystem.
diff --git a/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs
index fa4b21dbc8..85fa8d894b 100644
--- a/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs
@@ -26,14 +26,14 @@ namespace Umbraco.Core.Persistence.Repositories
void AddOrUpdateGroupWithUsers(IUserGroup userGroup, int[] userIds);
///
- /// Gets explicilty defined permissions for the group for specified entities
+ /// Gets explicitly defined permissions for the group for specified entities
///
///
/// Array of entity Ids, if empty will return permissions for the group for all entities
EntityPermissionCollection GetPermissions(int[] groupIds, params int[] entityIds);
///
- /// Gets explicilt and default permissions (if requested) permissions for the group for specified entities
+ /// Gets explicit and default permissions (if requested) permissions for the group for specified entities
///
///
/// If true will include the group's default permissions if no permissions are explicitly assigned
diff --git a/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs
index c9ed1af558..0ec7972d08 100644
--- a/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs
@@ -51,7 +51,7 @@ namespace Umbraco.Core.Persistence.Repositories
///
/// A filter to only include users that do not belong to these user groups
///
- /// Optional parameter to filter by specfied user state
+ /// Optional parameter to filter by specified user state
///
IEnumerable GetPagedResultsByQuery(IQuery query, long pageIndex, int pageSize, out long totalRecords,
Expression> orderBy, Direction orderDirection = Direction.Ascending,
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs
index 3cf9f50e40..8057c87578 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs
@@ -515,7 +515,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
}
// now we have
- // - the definitinos
+ // - the definitions
// - all property data dtos
// - tag editors
// and we need to build the proper property collections
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs
index 773716b401..a9bb097346 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs
@@ -82,7 +82,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var dtos = Database.Fetch(sql);
return
- //This returns a lookup from the GetAll cached looup
+ //This returns a lookup from the GetAll cached lookup
(dtos.Any()
? GetMany(dtos.DistinctBy(x => x.ContentTypeDto.NodeId).Select(x => x.ContentTypeDto.NodeId).ToArray())
: Enumerable.Empty())
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
index 45532fc06a..3bc730d5d0 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
@@ -103,7 +103,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
.On(left => left.DataTypeId, right => right.NodeId);
var translator = new SqlTranslator(sqlClause, query);
-
var sql = translator.Translate()
.OrderBy(x => x.PropertyTypeGroupId);
@@ -121,7 +120,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
{
var dto = ContentTypeFactory.BuildContentTypeDto(entity);
- //Cannot add a duplicate content type type
+ //Cannot add a duplicate content type
var exists = Database.ExecuteScalar(@"SELECT COUNT(*) FROM cmsContentType
INNER JOIN umbracoNode ON cmsContentType.nodeId = umbracoNode.id
WHERE cmsContentType." + SqlSyntax.GetQuotedColumnName("alias") + @"= @alias
@@ -1318,7 +1317,7 @@ AND umbracoNode.id <> @id",
parentMediaTypeIds = new Dictionary>();
var mappedMediaTypes = new List();
- //loop through each result and fill in our required values, each row will contain different requried data than the rest.
+ //loop through each result and fill in our required values, each row will contain different required data than the rest.
// it is much quicker to iterate each result and populate instead of looking up the values over and over in the result like
// we used to do.
var queue = new Queue(result);
@@ -1725,7 +1724,7 @@ ORDER BY contentTypeId, groupId, id";
}
///
- /// Gets all entities of the spefified type
+ /// Gets all entities of the specified type
///
///
///
@@ -1749,7 +1748,7 @@ ORDER BY contentTypeId, groupId, id";
public string GetUniqueAlias(string alias)
{
- // alias is unique accross ALL content types!
+ // alias is unique across ALL content types!
var aliasColumn = SqlSyntax.GetQuotedColumnName("alias");
var aliases = Database.Fetch(@"SELECT cmsContentType." + aliasColumn + @" FROM cmsContentType
INNER JOIN umbracoNode ON cmsContentType.nodeId = umbracoNode.id
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs
index f4f0da8bee..0e6ff0310d 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs
@@ -26,7 +26,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
{
private readonly Lazy _editors;
- // fixme/task - get rid of Lazy injection and fix circular dependencies
+ // TODO - https://github.com/umbraco/Umbraco-CMS/issues/4237 - get rid of Lazy injection and fix circular dependencies
public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger)
: base(scopeAccessor, cache, logger)
{
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs
index 09fa420f26..7176e092c9 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
///
/// It would be nicer if we could separate most of this down into a smaller version of the ContentRepository class, however to do that
- /// requires quite a lot of work since we'd need to re-organize the interhitance quite a lot or create a helper class to perform a lot of the underlying logic.
+ /// requires quite a lot of work since we'd need to re-organize the inheritance quite a lot or create a helper class to perform a lot of the underlying logic.
///
/// TODO: Create a helper method to contain most of the underlying logic for the ContentRepository
///
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
index 0011a384ab..8bee55060b 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
@@ -260,7 +260,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
protected override void PersistNewItem(IContent entity)
{
- // fixme/task - sort out IContent vs Content
+ // TODO: https://github.com/umbraco/Umbraco-CMS/issues/4234 - sort out IContent vs Content
// however, it's not just so we have access to AddingEntity
// there are tons of things at the end of the methods, that can only work with a true Content
// and basically, the repository requires a Content, not an IContent
@@ -562,7 +562,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
Database.Execute(deleteDocumentVariations);
// todo NPoco InsertBulk issue?
- // we should use the native NPoco InsertBulk here but it causes problems (not sure exaclty all scenarios)
+ // we should use the native NPoco InsertBulk here but it causes problems (not sure exactly all scenarios)
// but by using SQL Server and updating a variants name will cause: Unable to cast object of type
// 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'.
// (same in PersistNewItem above)
@@ -1333,7 +1333,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
// variant content = update with default culture or anything really
EnsureInvariantNameExists(content);
- // ensure that that invariant name is unique
+ // ensure that invariant name is unique
EnsureInvariantNameIsUnique(content);
// and finally,
@@ -1352,7 +1352,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
if (content.CultureInfos.Count == 0)
throw new InvalidOperationException("Cannot save content with an empty name.");
- // and then, we need to set the invariant name implicitely,
+ // and then, we need to set the invariant name implicitly,
// using the default culture if it has a name, otherwise anything we can
var defaultCulture = LanguageRepository.GetDefaultIsoCode();
content.Name = defaultCulture != null && content.CultureInfos.TryGetValue(defaultCulture, out var cultureName)
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs
index 4639871a4a..5287af353a 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs
@@ -85,7 +85,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var dtos = Database.Fetch(sql);
return
- //This returns a lookup from the GetAll cached looup
+ //This returns a lookup from the GetAll cached lookup
(dtos.Any()
? GetMany(dtos.DistinctBy(x => x.NodeId).Select(x => x.NodeId).ToArray())
: Enumerable.Empty())
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs
index 3106a5f16e..9d7556f356 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs
@@ -70,7 +70,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
// check if the query is based on properties or not
var wheres = query.GetWhereClauses();
- //this is a pretty rudimentary check but wil work, we just need to know if this query requires property
+ //this is a pretty rudimentary check but will work, we just need to know if this query requires property
// level queries
if (wheres.Any(x => x.Item1.Contains("cmsPropertyType")))
{
@@ -583,7 +583,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
// load all properties for all documents from database in 1 query - indexed by version id
var properties = GetPropertyCollections(temps);
- // assign properites
+ // assign properties
foreach (var temp in temps)
{
temp.Content.Properties = properties[temp.VersionId];
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs
index b81ce4010b..22a5059be7 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs
@@ -205,7 +205,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
entity.Icon = "icon-user";
}
- //By Convention we add 9 stnd PropertyTypes to an Umbraco MemberType
+ //By Convention we add 9 standard PropertyTypes to an Umbraco MemberType
entity.AddPropertyGroup(Constants.Conventions.Member.StandardPropertiesGroupName);
var standardPropertyTypes = Constants.Conventions.Member.GetStandardPropertyTypeStubs();
foreach (var standardPropertyType in standardPropertyTypes)
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
index fc27c38d70..a183894462 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
@@ -480,7 +480,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
public IEnumerable GetAll(params string[] aliases)
{
//We must call the base (normal) GetAll method
- // which is cached. This is a specialized method and unfortunatley with the params[] it
+ // which is cached. This is a specialized method and unfortunately with the params[] it
// overlaps with the normal GetAll method.
if (aliases.Any() == false) return base.GetMany();
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
index c76a5de0d0..b42060b6cc 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
@@ -89,7 +89,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
- /// Gets explicilty defined permissions for the group for specified entities
+ /// Gets explicitly defined permissions for the group for specified entities
///
///
/// Array of entity Ids, if empty will return permissions for the group for all entities
@@ -99,7 +99,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
}
///
- /// Gets explicilt and default permissions (if requested) permissions for the group for specified entities
+ /// Gets explicit and default permissions (if requested) permissions for the group for specified entities
///
///
/// If true will include the group's default permissions if no permissions are explicitly assigned
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs
index dc5e8e5d4b..2242c65256 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs
@@ -169,7 +169,7 @@ ORDER BY colName";
public Guid CreateLoginSession(int userId, string requestingIpAddress, bool cleanStaleSessions = true)
{
- //TODO: I know this doesn't follow the normal repository conventions which would require us to crete a UserSessionRepository
+ //TODO: I know this doesn't follow the normal repository conventions which would require us to create a UserSessionRepository
//and also business logic models for these objects but that's just so overkill for what we are doing
//and now that everything is properly in a transaction (Scope) there doesn't seem to be much reason for using that anymore
var now = DateTime.UtcNow;
@@ -690,7 +690,7 @@ ORDER BY colName";
///
/// A filter to only include users that do not belong to these user groups
///
- /// Optional parameter to filter by specfied user state
+ /// Optional parameter to filter by specified user state
///
///
///
diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
index 9dec7de451..d6ceeaa3e6 100644
--- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
+++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
@@ -477,7 +477,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
var dbTypeDefinition = column.Size != default(int)
? $"{definition}({column.Size})"
: definition;
- //NOTE Percision is left out
+ //NOTE Precision is left out
return dbTypeDefinition;
}
diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs
index cd6da569c5..aec49b8eb5 100644
--- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs
+++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs
@@ -59,14 +59,18 @@ namespace Umbraco.Core.Persistence
/// Used by the other ctor and in tests.
public UmbracoDatabaseFactory(string connectionStringName, ILogger logger, Lazy mappers)
{
- if (string.IsNullOrWhiteSpace(connectionStringName)) throw new ArgumentNullOrEmptyException(nameof(connectionStringName));
+ if (string.IsNullOrWhiteSpace(connectionStringName))
+ throw new ArgumentNullOrEmptyException(nameof(connectionStringName));
_mappers = mappers ?? throw new ArgumentNullException(nameof(mappers));
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
var settings = ConfigurationManager.ConnectionStrings[connectionStringName];
if (settings == null)
+ {
+ logger.Debug("Missing connection string, defer configuration.");
return; // not configured
+ }
// could as well be
// so need to test the values too
@@ -74,7 +78,7 @@ namespace Umbraco.Core.Persistence
var providerName = settings.ProviderName;
if (string.IsNullOrWhiteSpace(connectionString) || string.IsNullOrWhiteSpace(providerName))
{
- logger.Debug("Missing connection string or provider name, defer configuration.");
+ logger.Debug("Empty connection string or provider name, defer configuration.");
return; // not configured
}
diff --git a/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs b/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs
index cf007e681d..9d1193ac82 100644
--- a/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs
+++ b/src/Umbraco.Core/PropertyEditors/ConfigurationEditorOfTConfiguration.cs
@@ -54,7 +54,7 @@ namespace Umbraco.Core.PropertyEditors
continue;
}
- // if the field has its own type, instanciate it
+ // if the field has its own type, instantiate it
try
{
field = (ConfigurationField) Activator.CreateInstance(attribute.Type);
@@ -130,7 +130,7 @@ namespace Umbraco.Core.PropertyEditors
/// The current configuration object.
public virtual TConfiguration FromConfigurationEditor(IDictionary editorValues, TConfiguration configuration)
{
- // note - editorValue contains a mix of Clr types (string, int...) and JToken
+ // note - editorValue contains a mix of CLR types (string, int...) and JToken
// turning everything back into a JToken... might not be fastest but is simplest
// for now
diff --git a/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs b/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs
index 3acd67b0c2..ac74953230 100644
--- a/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs
+++ b/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs
@@ -65,7 +65,7 @@ namespace Umbraco.Core.PropertyEditors
public string PropertyName { get; set; }
///
- /// Gets or sets the property clr type of the field.
+ /// Gets or sets the property CLR type of the field.
///
[JsonIgnore]
public Type PropertyType { get; set; }
diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs
index 9a9a105ca8..ca08127d51 100644
--- a/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs
+++ b/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs
@@ -48,7 +48,7 @@ namespace Umbraco.Core.PropertyEditors
/// The friendly name of the editor.
/// The view to use to render the editor.
///
- /// Set to to explicitely set the view to null.
+ /// Set to to explicitly set the view to null.
/// Otherwise, cannot be null nor empty.
///
public DataEditorAttribute(string alias, EditorType type, string name, string view)
@@ -129,4 +129,4 @@ namespace Umbraco.Core.PropertyEditors
/// A deprecated editor is still supported but not proposed in the UI.
public bool IsDeprecated { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
index 154fbfae98..153039dedb 100644
--- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
+++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
@@ -93,7 +93,7 @@ namespace Umbraco.Core.PropertyEditors
// mandatory and regex validators cannot be part of valueEditor.Validators because they
// depend on values that are not part of the configuration, .Mandatory and .ValidationRegEx,
- // so they have to be explicitely invoked here.
+ // so they have to be explicitly invoked here.
if (required)
{
@@ -128,7 +128,7 @@ namespace Umbraco.Core.PropertyEditors
public virtual IValueFormatValidator FormatValidator => new RegexValidator();
///
- /// If this is is true than the editor will be displayed full width without a label
+ /// If this is true than the editor will be displayed full width without a label
///
[JsonProperty("hideLabel")]
public bool HideLabel { get; set; }
@@ -196,7 +196,7 @@ namespace Umbraco.Core.PropertyEditors
///
///
///
- /// The current value that has been persisted to the database for this editor. This value may be usesful for
+ /// The current value that has been persisted to the database for this editor. This value may be useful for
/// how the value then get's deserialized again to be re-persisted. In most cases it will probably not be used.
///
///
@@ -318,7 +318,7 @@ namespace Umbraco.Core.PropertyEditors
///
///
/// By default, this returns the value of ConvertDbToString but ensures that if the db value type is
- /// NVarchar or NText, the value is returned as a CDATA fragment - elxe it's a Text fragment.
+ /// NVarchar or NText, the value is returned as a CDATA fragment - else it's a Text fragment.
/// Returns an XText or XCData instance which must be wrapped in a element.
/// If the value is empty we will not return as CDATA since that will just take up more space in the file.
///
diff --git a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs
index 258febe813..f6a7cbf32f 100644
--- a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs
@@ -62,7 +62,7 @@ namespace Umbraco.Core.PropertyEditors
/// The converter should be prepared to handle both situations.
/// When source values are strings, the converter must handle empty strings, whitespace
/// strings, and xml-whitespace strings appropriately, ie it should know whether to preserve
- /// whitespaces.
+ /// white spaces.
///
object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview);
@@ -99,7 +99,7 @@ namespace Umbraco.Core.PropertyEditors
/// indicating that no value has been assigned to the property. It is up to the converter to determine
/// what to return in that case: either null, or the default value...
/// If successful, the result should be either null, a string, or an XPathNavigator
- /// instance. Whether an xml-whitespace string should be returned as null or litterally, is
+ /// instance. Whether an xml-whitespace string should be returned as null or literally, is
/// up to the converter.
/// The converter may want to return an XML fragment that represent a part of the content tree,
/// but should pay attention not to create infinite loops that would kill XPath and XSLT.
diff --git a/src/Umbraco.Core/ReadLock.cs b/src/Umbraco.Core/ReadLock.cs
index d575401b10..9d3ef22168 100644
--- a/src/Umbraco.Core/ReadLock.cs
+++ b/src/Umbraco.Core/ReadLock.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Core
///
///
/// Intended as an infrastructure class.
- /// This is a very unefficient way to lock as it allocates one object each time we lock,
+ /// This is a very inefficient way to lock as it allocates one object each time we lock,
/// so it's OK to use this class for things that happen once, where it is convenient, but not
/// for performance-critical code!
///
diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs
index 6918c9b423..9c18b3d8c3 100644
--- a/src/Umbraco.Core/Runtime/CoreRuntime.cs
+++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs
@@ -100,6 +100,9 @@ namespace Umbraco.Core.Runtime
// throws if not full-trust
new AspNetHostingPermission(AspNetHostingPermissionLevel.Unrestricted).Demand();
+ // run handlers
+ RuntimeOptions.DoRuntimeBoot(ProfilingLogger);
+
// application caches
var appCaches = GetAppCaches();
@@ -131,12 +134,17 @@ namespace Umbraco.Core.Runtime
composition = new Composition(register, typeLoader, ProfilingLogger, _state, configs);
composition.RegisterEssentials(Logger, Profiler, ProfilingLogger, mainDom, appCaches, databaseFactory, typeLoader, _state);
+ // run handlers
+ RuntimeOptions.DoRuntimeEssentials(composition, appCaches, typeLoader, databaseFactory);
+
// register runtime-level services
// there should be none, really - this is here "just in case"
Compose(composition);
- // acquire the main domain, determine our runtime level
+ // acquire the main domain
AcquireMainDom(mainDom);
+
+ // determine our runtime level
DetermineRuntimeLevel(databaseFactory, ProfilingLogger);
// get composers, and compose
@@ -288,7 +296,7 @@ namespace Umbraco.Core.Runtime
///
public virtual void Terminate()
{
- _components.Terminate();
+ _components?.Terminate();
}
///
@@ -328,7 +336,7 @@ namespace Umbraco.Core.Runtime
{
// need the deep clone runtime cache provider to ensure entities are cached properly, ie
// are cloned in and cloned out - no request-based cache here since no web-based context,
- // is overriden by the web runtime
+ // is overridden by the web runtime
return new AppCaches(
new DeepCloneAppCache(new ObjectCacheAppCache()),
diff --git a/src/Umbraco.Core/RuntimeOptions.cs b/src/Umbraco.Core/RuntimeOptions.cs
new file mode 100644
index 0000000000..1f89ee6314
--- /dev/null
+++ b/src/Umbraco.Core/RuntimeOptions.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Runtime.CompilerServices;
+using Umbraco.Core.Cache;
+using Umbraco.Core.Components;
+using Umbraco.Core.Composing;
+using Umbraco.Core.Logging;
+using Umbraco.Core.Persistence;
+
+namespace Umbraco.Core
+{
+ ///
+ /// Provides static options for the runtime.
+ ///
+ ///
+ /// These options can be configured in PreApplicationStart or via appSettings.
+ ///
+ public static class RuntimeOptions
+ {
+ private static List> _onBoot;
+ private static List> _onEssentials;
+ private static bool? _installMissingDatabase;
+ private static bool? _installEmptyDatabase;
+
+ // reads a boolean appSetting
+ private static bool BoolSetting(string key, bool missing) => ConfigurationManager.AppSettings[key]?.InvariantEquals("true") ?? missing;
+
+ ///
+ /// Gets a value indicating whether the runtime should enter Install level when the database is missing.
+ ///
+ ///
+ /// By default, when a database connection string is configured but it is not possible to
+ /// connect to the database, the runtime enters the BootFailed level. If this options is set to true,
+ /// it enters the Install level instead.
+ /// It is then up to the implementor, that is setting this value, to take over the installation
+ /// sequence.
+ ///
+ public static bool InstallMissingDatabase
+ {
+ get => _installEmptyDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallMissingDatabase", false);
+ set => _installEmptyDatabase = value;
+ }
+
+ ///
+ /// Gets a value indicating whether the runtime should enter Install level when the database is empty.
+ ///
+ ///
+ /// By default, when a database connection string is configured and it is possible to connect to
+ /// the database, but the database is empty, the runtime enters the BootFailed level. If this options
+ /// is set to true, it enters the Install level instead.
+ /// It is then up to the implementor, that is setting this value, to take over the installation
+ /// sequence.
+ ///
+ public static bool InstallEmptyDatabase
+ {
+ get => _installMissingDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallEmptyDatabase", false);
+ set => _installMissingDatabase = value;
+ }
+
+ ///
+ /// Executes the RuntimeBoot handlers.
+ ///
+ internal static void DoRuntimeBoot(IProfilingLogger logger)
+ {
+ if (_onBoot == null)
+ return;
+
+ foreach (var action in _onBoot)
+ action(logger);
+ }
+
+ ///
+ /// Executes the RuntimeEssentials handlers.
+ ///
+ internal static void DoRuntimeEssentials(Composition composition, AppCaches appCaches, TypeLoader typeLoader, IUmbracoDatabaseFactory databaseFactory)
+ {
+ if (_onEssentials== null)
+ return;
+
+ foreach (var action in _onEssentials)
+ action(composition, appCaches, typeLoader, databaseFactory);
+ }
+
+ ///
+ /// Registers a RuntimeBoot handler.
+ ///
+ ///
+ /// A RuntimeBoot handler runs when the runtime boots, right after the
+ /// loggers have been created, but before anything else.
+ ///
+ public static void OnRuntimeBoot(Action action)
+ {
+ if (_onBoot == null)
+ _onBoot = new List>();
+ _onBoot.Add(action);
+ }
+
+ ///
+ /// Registers a RuntimeEssentials handler.
+ ///
+ ///
+ /// A RuntimeEssentials handler runs after the runtime has created a few
+ /// essential things (AppCaches, a TypeLoader, and a database factory) but
+ /// before anything else.
+ ///
+ public static void OnRuntimeEssentials(Action action)
+ {
+ if (_onEssentials == null)
+ _onEssentials = new List>();
+ _onEssentials.Add(action);
+ }
+ }
+}
diff --git a/src/Umbraco.Core/RuntimeState.cs b/src/Umbraco.Core/RuntimeState.cs
index 85e8c7370d..b21c02fdb9 100644
--- a/src/Umbraco.Core/RuntimeState.cs
+++ b/src/Umbraco.Core/RuntimeState.cs
@@ -169,7 +169,7 @@ namespace Umbraco.Core
else if (databaseFactory.Configured == false)
{
// local version *does* match code version, but the database is not configured
- // install (again? this is a weird situation...)
+ // install - may happen with Deploy/Cloud/etc
logger.Debug("Database is not configured, need to install Umbraco.");
Level = RuntimeLevel.Install;
Reason = RuntimeLevelReason.InstallNoDatabase;
@@ -179,7 +179,7 @@ namespace Umbraco.Core
// else, keep going,
// anything other than install wants a database - see if we can connect
// (since this is an already existing database, assume localdb is ready)
- var tries = RuntimeStateOptions.InstallMissingDatabase ? 2 : 5;
+ var tries = RuntimeOptions.InstallMissingDatabase ? 2 : 5;
for (var i = 0;;)
{
connect = databaseFactory.CanConnect;
@@ -193,7 +193,7 @@ namespace Umbraco.Core
// cannot connect to configured database, this is bad, fail
logger.Debug("Could not connect to database.");
- if (RuntimeStateOptions.InstallMissingDatabase)
+ if (RuntimeOptions.InstallMissingDatabase)
{
// ok to install on a configured but missing database
Level = RuntimeLevel.Install;
@@ -222,7 +222,7 @@ namespace Umbraco.Core
// can connect to the database but cannot check the upgrade state... oops
logger.Warn(e, "Could not check the upgrade state.");
- if (RuntimeStateOptions.InstallEmptyDatabase)
+ if (RuntimeOptions.InstallEmptyDatabase)
{
// ok to install on an empty database
Level = RuntimeLevel.Install;
diff --git a/src/Umbraco.Core/RuntimeStateOptions.cs b/src/Umbraco.Core/RuntimeStateOptions.cs
deleted file mode 100644
index 9262a8a990..0000000000
--- a/src/Umbraco.Core/RuntimeStateOptions.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Configuration;
-
-namespace Umbraco.Core
-{
- ///
- /// Allows configuration of the in PreApplicationStart or in appSettings
- ///
- public static class RuntimeStateOptions
- {
- // configured statically or via app settings
- private static bool BoolSetting(string key, bool missing) => ConfigurationManager.AppSettings[key]?.InvariantEquals("true") ?? missing;
-
- ///
- /// If true the RuntimeState will continue the installation sequence when a database is missing
- ///
- ///
- /// In this case it will be up to the implementor that is setting this value to true to take over the bootup/installation sequence
- ///
- public static bool InstallMissingDatabase
- {
- get => _installEmptyDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallMissingDatabase", false);
- set => _installEmptyDatabase = value;
- }
-
- ///
- /// If true the RuntimeState will continue the installation sequence when a database is available but is empty
- ///
- ///
- /// In this case it will be up to the implementor that is setting this value to true to take over the bootup/installation sequence
- ///
- public static bool InstallEmptyDatabase
- {
- get => _installMissingDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallEmptyDatabase", false);
- set => _installMissingDatabase = value;
- }
-
- private static bool? _installMissingDatabase;
- private static bool? _installEmptyDatabase;
- }
-}
\ No newline at end of file
diff --git a/src/Umbraco.Core/SafeCallContext.cs b/src/Umbraco.Core/SafeCallContext.cs
index 357def0a97..95394409bb 100644
--- a/src/Umbraco.Core/SafeCallContext.cs
+++ b/src/Umbraco.Core/SafeCallContext.cs
@@ -45,8 +45,8 @@ namespace Umbraco.Core
//
// note
// see System.Transactions
- // pre 4.5.1, the TransactionScope would not flow in async, and then then introduced
- // an option to store in in the LLC so that it flows
+ // pre 4.5.1, the TransactionScope would not flow in async, and then introduced
+ // an option to store in the LLC so that it flows
// they are using a conditional weak table to store the data, and what they store in
// LLC is the key - which is just an empty MarshalByRefObject that is created with
// the transaction scope - that way, they can "clear current data" provided that
diff --git a/src/Umbraco.Core/Scoping/IScopeContext.cs b/src/Umbraco.Core/Scoping/IScopeContext.cs
index 093ebef4f7..0a267e67e2 100644
--- a/src/Umbraco.Core/Scoping/IScopeContext.cs
+++ b/src/Umbraco.Core/Scoping/IScopeContext.cs
@@ -7,7 +7,7 @@ namespace Umbraco.Core.Scoping
///
/// A scope context can enlist objects that will be attached to the scope, and available
/// for the duration of the scope. In addition, it can enlist actions, that will run when the
- /// scope is exiting, and after the database transaction has been commited.
+ /// scope is exiting, and after the database transaction has been committed.
public interface IScopeContext
{
///
diff --git a/src/Umbraco.Core/Scoping/ScopeProvider.cs b/src/Umbraco.Core/Scoping/ScopeProvider.cs
index ea68a05f15..3c0fa94327 100644
--- a/src/Umbraco.Core/Scoping/ScopeProvider.cs
+++ b/src/Umbraco.Core/Scoping/ScopeProvider.cs
@@ -425,7 +425,7 @@ namespace Umbraco.Core.Scoping
// LogHelper.Debug("CallContext: " + Environment.StackTrace);
//}
- // all scope instances that are currently beeing tracked
+ // all scope instances that are currently being tracked
private static readonly object StaticScopeInfosLock = new object();
private static readonly Dictionary StaticScopeInfos = new Dictionary();
diff --git a/src/Umbraco.Core/Security/BackOfficeUserStore.cs b/src/Umbraco.Core/Security/BackOfficeUserStore.cs
index 2dc14c727f..2d9469180a 100644
--- a/src/Umbraco.Core/Security/BackOfficeUserStore.cs
+++ b/src/Umbraco.Core/Security/BackOfficeUserStore.cs
@@ -538,7 +538,7 @@ namespace Umbraco.Core.Security
///
///
///
- /// Currently we do not suport a timed lock out, when they are locked out, an admin will have to reset the status
+ /// Currently we do not support a timed lock out, when they are locked out, an admin will have to reset the status
///
public Task GetLockoutEndDateAsync(BackOfficeIdentityUser user)
{
@@ -555,7 +555,7 @@ namespace Umbraco.Core.Security
///
///
///
- /// Currently we do not suport a timed lock out, when they are locked out, an admin will have to reset the status
+ /// Currently we do not support a timed lock out, when they are locked out, an admin will have to reset the status
///
public Task SetLockoutEndDateAsync(BackOfficeIdentityUser user, DateTimeOffset lockoutEnd)
{
diff --git a/src/Umbraco.Core/Security/MembershipProviderBase.cs b/src/Umbraco.Core/Security/MembershipProviderBase.cs
index f6b2483206..633e12bcc1 100644
--- a/src/Umbraco.Core/Security/MembershipProviderBase.cs
+++ b/src/Umbraco.Core/Security/MembershipProviderBase.cs
@@ -522,7 +522,7 @@ namespace Umbraco.Core.Security
protected abstract MembershipUser PerformCreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
///
- /// Gets the members password if password retreival is enabled
+ /// Gets the members password if password retrieval is enabled
///
///
///
@@ -539,7 +539,7 @@ namespace Umbraco.Core.Security
}
///
- /// Gets the members password if password retreival is enabled
+ /// Gets the members password if password retrieval is enabled
///
///
///
diff --git a/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs
index 9a1b3c5ae8..e3448db181 100644
--- a/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs
+++ b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs
@@ -5,7 +5,7 @@ using Microsoft.AspNet.Identity;
namespace Umbraco.Core.Security
{
///
- /// Ensure that both the normal password validator rules are processed along with the underlying memberhsip provider rules
+ /// Ensure that both the normal password validator rules are processed along with the underlying membership provider rules
///
public class MembershipProviderPasswordValidator : PasswordValidator
{
diff --git a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs
index 589673d601..e9693747cf 100644
--- a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs
+++ b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs
@@ -113,7 +113,7 @@ namespace Umbraco.Core.Security
/// Returns the required claim types for a back office identity
///
///
- /// This does not incude the role claim type or allowed apps type since that is a collection and in theory could be empty
+ /// This does not include the role claim type or allowed apps type since that is a collection and in theory could be empty
///
public static IEnumerable RequiredBackOfficeIdentityClaimTypes => new[]
{
diff --git a/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs b/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs
index dcc084238b..b06ee870de 100644
--- a/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs
+++ b/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Core.Serialization
///
///
///
- /// In some cases thsi is required if your model has an explicit type converter, see: http://stackoverflow.com/a/31328131/694494
+ /// In some cases this is required if your model has an explicit type converter, see: http://stackoverflow.com/a/31328131/694494
///
/// NOTE: I was going to use this for the ImageCropDataSetConverter to convert to String, which would have worked by putting this attribute:
/// [JsonConverter(typeof(NoTypeConverterJsonConverter{ImageCropDataSet}))] on top of the ImageCropDataSet class, however it turns out we
diff --git a/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs b/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs
index e5298ef235..497f7d47a9 100644
--- a/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs
+++ b/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs
@@ -7,7 +7,7 @@ namespace Umbraco.Core.Services.Changes
{
None = 0,
Create = 1, // item type has been created, no impact
- RefreshMain = 2, // changed, impacts content (adding ppty or composition does NOT)
+ RefreshMain = 2, // changed, impacts content (adding property or composition does NOT)
RefreshOther = 4, // changed, other changes
Remove = 8 // item type has been removed
}
diff --git a/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs b/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs
index 06ba1ada79..f643039dca 100644
--- a/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs
+++ b/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs
@@ -58,7 +58,7 @@ namespace Umbraco.Core.Services
}
// if it is not used then composition is possible
- // hashset guarantees unicity on Id
+ // hashset guarantees uniqueness on Id
var list = new HashSet(new DelegateEqualityComparer(
(x, y) => x.Id == y.Id,
x => x.Id));
@@ -141,7 +141,7 @@ namespace Umbraco.Core.Services
{
if (ctype == null) return Enumerable.Empty();
- // hashset guarantees unicity on Id
+ // hashset guarantees uniqueness on Id
var all = new HashSet(new DelegateEqualityComparer(
(x, y) => x.Id == y.Id,
x => x.Id));
diff --git a/src/Umbraco.Core/Services/IConsentService.cs b/src/Umbraco.Core/Services/IConsentService.cs
index fdcf18bc74..c6478ddd2b 100644
--- a/src/Umbraco.Core/Services/IConsentService.cs
+++ b/src/Umbraco.Core/Services/IConsentService.cs
@@ -37,7 +37,7 @@ namespace Umbraco.Core.Services
/// Determines whether is a start pattern.
/// Determines whether is a start pattern.
/// Determines whether to include the history of consents.
- /// Consents matching the paramters.
+ /// Consents matching the parameters.
IEnumerable LookupConsent(string source = null, string context = null, string action = null,
bool sourceStartsWith = false, bool contextStartsWith = false, bool actionStartsWith = false,
bool includeHistory = false);
diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs
index d9a8191441..3a3c43c6a0 100644
--- a/src/Umbraco.Core/Services/IContentService.cs
+++ b/src/Umbraco.Core/Services/IContentService.cs
@@ -182,7 +182,7 @@ namespace Umbraco.Core.Services
IQuery filter = null, Ordering ordering = null);
///
- /// Gets paged documents of a content content
+ /// Gets paged documents of a content
///
/// The page number.
/// The page number.
@@ -303,7 +303,7 @@ namespace Umbraco.Core.Services
/// Copies a document.
///
///
- /// Optionaly recursively copies all children.
+ /// Optionally recursively copies all children.
///
IContent Copy(IContent content, int parentId, bool relateToOriginal, bool recursive, int userId = 0);
diff --git a/src/Umbraco.Core/Services/IContentServiceBase.cs b/src/Umbraco.Core/Services/IContentServiceBase.cs
index a748e88fb4..439c55d0d0 100644
--- a/src/Umbraco.Core/Services/IContentServiceBase.cs
+++ b/src/Umbraco.Core/Services/IContentServiceBase.cs
@@ -1,7 +1,7 @@
namespace Umbraco.Core.Services
{
///
- /// Placehold for sharing logic between the content, media (and member) services
+ /// Placeholder for sharing logic between the content, media (and member) services
/// TODO: Start sharing the logic!
///
public interface IContentServiceBase : IService
diff --git a/src/Umbraco.Core/Services/IDataTypeService.cs b/src/Umbraco.Core/Services/IDataTypeService.cs
index 06aef3f1c7..537c0e629f 100644
--- a/src/Umbraco.Core/Services/IDataTypeService.cs
+++ b/src/Umbraco.Core/Services/IDataTypeService.cs
@@ -51,21 +51,21 @@ namespace Umbraco.Core.Services
/// Saves an
///
/// to save
- /// Id of the user issueing the save
+ /// Id of the user issuing the save
void Save(IDataType dataType, int userId = 0);
///
/// Saves a collection of
///
/// to save
- /// Id of the user issueing the save
+ /// Id of the user issuing the save
void Save(IEnumerable dataTypeDefinitions, int userId = 0);
///
/// Saves a collection of
///
/// to save
- /// Id of the user issueing the save
+ /// Id of the user issuing the save
/// Boolean indicating whether or not to raise events
void Save(IEnumerable dataTypeDefinitions, int userId, bool raiseEvents);
@@ -77,14 +77,14 @@ namespace Umbraco.Core.Services
/// all the data that references this .
///
/// to delete
- /// Id of the user issueing the deletion
+ /// Id of the user issuing the deletion
void Delete(IDataType dataType, int userId = 0);
///
/// Gets a by its control Id
///
/// Alias of the property editor
- /// Collection of objects with a matching contorl id
+ /// Collection of objects with a matching control id
IEnumerable GetByEditorAlias(string propertyEditorAlias);
Attempt> Move(IDataType toMove, int parentId);
diff --git a/src/Umbraco.Core/Services/IEntityService.cs b/src/Umbraco.Core/Services/IEntityService.cs
index a9a3c0c59b..3f398cc1e9 100644
--- a/src/Umbraco.Core/Services/IEntityService.cs
+++ b/src/Umbraco.Core/Services/IEntityService.cs
@@ -264,7 +264,7 @@ namespace Umbraco.Core.Services
UmbracoObjectTypes GetObjectType(IUmbracoEntity entity);
///
- /// Gets the Clr type of an entity.
+ /// Gets the CLR type of an entity.
///
Type GetEntityType(int id);
diff --git a/src/Umbraco.Core/Services/IExternalLoginService.cs b/src/Umbraco.Core/Services/IExternalLoginService.cs
index 535b797d61..a81543cf2d 100644
--- a/src/Umbraco.Core/Services/IExternalLoginService.cs
+++ b/src/Umbraco.Core/Services/IExternalLoginService.cs
@@ -18,7 +18,7 @@ namespace Umbraco.Core.Services
///
/// Returns all logins matching the login info - generally there should only be one but in some cases
- /// there might be more than one depending on if an adminstrator has been editing/removing members
+ /// there might be more than one depending on if an administrator has been editing/removing members
///
///
///
diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs
index daf5d9b80c..a895eff7e1 100644
--- a/src/Umbraco.Core/Services/IFileService.cs
+++ b/src/Umbraco.Core/Services/IFileService.cs
@@ -130,7 +130,7 @@ namespace Umbraco.Core.Services
///
/// Gets a object by its identifier.
///
- /// The identifer of the template.
+ /// The identifier of the template.
/// The object matching the identifier, or null.
ITemplate GetTemplate(int id);
diff --git a/src/Umbraco.Core/Services/IMediaService.cs b/src/Umbraco.Core/Services/IMediaService.cs
index ce46b197a0..ce2062d08d 100644
--- a/src/Umbraco.Core/Services/IMediaService.cs
+++ b/src/Umbraco.Core/Services/IMediaService.cs
@@ -109,7 +109,7 @@ namespace Umbraco.Core.Services
IQuery filter = null, Ordering ordering = null);
///
- /// Gets paged documents of a content content
+ /// Gets paged documents of a content
///
/// The page number.
/// The page number.
@@ -179,7 +179,7 @@ namespace Umbraco.Core.Services
///
/// This needs extra care and attention as its potentially a dangerous and extensive operation
/// Ids of the s
- /// Optional Id of the user issueing the delete operation
+ /// Optional Id of the user issuing the delete operation
void DeleteMediaOfTypes(IEnumerable mediaTypeIds, int userId = 0);
///
diff --git a/src/Umbraco.Core/Services/IMembershipMemberService.cs b/src/Umbraco.Core/Services/IMembershipMemberService.cs
index 23d0fc2765..448b0c761a 100644
--- a/src/Umbraco.Core/Services/IMembershipMemberService.cs
+++ b/src/Umbraco.Core/Services/IMembershipMemberService.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Core.Services
/// Defines part of the MemberService, which is specific to methods used by the membership provider.
///
///
- /// Idea is to have this is an isolated interface so that it can be easily 'replaced' in the membership provider impl.
+ /// Idea is to have this as an isolated interface so that it can be easily 'replaced' in the membership provider implementation.
///
public interface IMembershipMemberService : IMembershipMemberService, IMembershipRoleService
{
@@ -29,7 +29,7 @@ namespace Umbraco.Core.Services
/// either for the MemberService or for the UserService.
///
///
- /// Idea is to have this is an isolated interface so that it can be easily 'replaced' in the membership provider impl.
+ /// Idea is to have this as an isolated interface so that it can be easily 'replaced' in the membership provider implementation.
///
public interface IMembershipMemberService : IService
where T : class, IMembershipUser
diff --git a/src/Umbraco.Core/Services/IUserService.cs b/src/Umbraco.Core/Services/IUserService.cs
index a926ce32aa..35a3be9eac 100644
--- a/src/Umbraco.Core/Services/IUserService.cs
+++ b/src/Umbraco.Core/Services/IUserService.cs
@@ -137,7 +137,7 @@ namespace Umbraco.Core.Services
///
/// If no permissions are found for a particular entity then the user's default permissions will be applied
/// User to retrieve permissions for
- /// Specifiying nothing will return all user permissions for all nodes that have explicit permissions defined
+ /// Specifying nothing will return all user permissions for all nodes that have explicit permissions defined
/// An enumerable list of
///
/// This will return the default permissions for the user's groups for node ids that don't have explicitly defined permissions
@@ -151,7 +151,7 @@ namespace Umbraco.Core.Services
///
/// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set
///
- /// Specifiying nothing will return all permissions for all nodes
+ /// Specifying nothing will return all permissions for all nodes
/// An enumerable list of
EntityPermissionCollection GetPermissions(IUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds);
diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs
index 9223793269..e1304a324f 100644
--- a/src/Umbraco.Core/Services/Implement/ContentService.cs
+++ b/src/Umbraco.Core/Services/Implement/ContentService.cs
@@ -519,7 +519,7 @@ namespace Umbraco.Core.Services.Implement
/// An Enumerable list of objects
public IEnumerable GetAncestors(int id)
{
- // intentionnaly not locking
+ // intentionally not locking
var content = GetById(id);
return GetAncestors(content);
}
@@ -628,7 +628,7 @@ namespace Umbraco.Core.Services.Implement
/// Parent object
public IContent GetParent(int id)
{
- // intentionnaly not locking
+ // intentionally not locking
var content = GetById(id);
return GetParent(content);
}
@@ -722,9 +722,9 @@ namespace Umbraco.Core.Services.Implement
}
///
- /// Checks if the passed in can be published based on the anscestors publish state.
+ /// Checks if the passed in can be published based on the ancestors publish state.
///
- /// to check if anscestors are published
+ /// to check if ancestors are published
/// True if the Content can be published, otherwise False
public bool IsPathPublishable(IContent content)
{
@@ -875,7 +875,7 @@ namespace Umbraco.Core.Services.Implement
// if culture is specific, first publish the invariant values, then publish the culture itself.
// if culture is '*', then publish them all (including variants)
- // explicitely SaveAndPublish a specific culture also publishes invariant values
+ // explicitly SaveAndPublish a specific culture also publishes invariant values
if (!culture.IsNullOrWhiteSpace() && culture != "*")
{
// publish the invariant values
@@ -1112,7 +1112,7 @@ namespace Umbraco.Core.Services.Implement
}
// if was not published and now is... descendants that were 'published' (but
- // had an unpublished ancestor) are 're-published' ie not explicitely published
+ // had an unpublished ancestor) are 're-published' ie not explicitly published
// but back as 'published' nevertheless
if (!branchOne && isNew == false && previouslyPublished == false && HasChildren(content.Id))
{
@@ -1833,7 +1833,7 @@ namespace Umbraco.Core.Services.Implement
return OperationResult.Cancel(evtMsgs);
}
- // emptying the recycle bin means deleting whetever is in there - do it properly!
+ // emptying the recycle bin means deleting whatever is in there - do it properly!
var query = Query().Where(x => x.ParentId == Constants.System.RecycleBinContent);
var contents = _documentRepository.Get(query).ToArray();
foreach (var content in contents)
@@ -1983,8 +1983,8 @@ namespace Umbraco.Core.Services.Implement
/// Sends an to Publication, which executes handlers and events for the 'Send to Publication' action.
///
/// The to send to publication
- /// Optional Id of the User issueing the send to publication
- /// True if sending publication was succesfull otherwise false
+ /// Optional Id of the User issuing the send to publication
+ /// True if sending publication was successful otherwise false
public bool SendToPublication(IContent content, int userId = 0)
{
using (var scope = ScopeProvider.CreateScope())
@@ -2550,7 +2550,7 @@ namespace Umbraco.Core.Services.Implement
/// inheritance and compositions, which need to be managed outside of this method.
///
/// Id of the
- /// Optional Id of the user issueing the delete operation
+ /// Optional Id of the user issuing the delete operation
public void DeleteOfTypes(IEnumerable contentTypeIds, int userId = 0)
{
//TODO: This currently this is called from the ContentTypeService but that needs to change,
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeService.cs
index fa818496ff..206f11e5b0 100644
--- a/src/Umbraco.Core/Services/Implement/ContentTypeService.cs
+++ b/src/Umbraco.Core/Services/Implement/ContentTypeService.cs
@@ -43,47 +43,47 @@ namespace Umbraco.Core.Services.Implement
}
///
- /// Gets all property type aliases accross content, media and member types.
+ /// Gets all property type aliases across content, media and member types.
///
/// All property type aliases.
- /// Beware! Works accross content, media and member types.
+ /// Beware! Works across content, media and member types.
public IEnumerable GetAllPropertyTypeAliases()
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
{
- // that one is special because it works accross content, media and member types
+ // that one is special because it works across content, media and member types
scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes);
return Repository.GetAllPropertyTypeAliases();
}
}
///
- /// Gets all content type aliases accross content, media and member types.
+ /// Gets all content type aliases across content, media and member types.
///
/// Optional object types guid to restrict to content, and/or media, and/or member types.
/// All content type aliases.
- /// Beware! Works accross content, media and member types.
+ /// Beware! Works across content, media and member types.
public IEnumerable GetAllContentTypeAliases(params Guid[] guids)
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
{
- // that one is special because it works accross content, media and member types
+ // that one is special because it works across content, media and member types
scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes);
return Repository.GetAllContentTypeAliases(guids);
}
}
///
- /// Gets all content type id for aliases accross content, media and member types.
+ /// Gets all content type id for aliases across content, media and member types.
///
/// Aliases to look for.
/// All content type ids.
- /// Beware! Works accross content, media and member types.
+ /// Beware! Works across content, media and member types.
public IEnumerable GetAllContentTypeIds(string[] aliases)
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
{
- // that one is special because it works accross content, media and member types
+ // that one is special because it works across content, media and member types
scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes);
return Repository.GetAllContentTypeIds(aliases);
}
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
index 234fa0b1e0..a9e75e6f29 100644
--- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
+++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
@@ -125,7 +125,7 @@ namespace Umbraco.Core.Services.Implement
// note
// this is meant to run *after* uow.Commit() so must use WasPropertyDirty() everywhere
- // instead of IsPropertyDirty() since dirty properties have been resetted already
+ // instead of IsPropertyDirty() since dirty properties have been reset already
var changes = new List>();
diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Core/Services/Implement/DataTypeService.cs
index 16b0dfd953..b97c3a3ee7 100644
--- a/src/Umbraco.Core/Services/Implement/DataTypeService.cs
+++ b/src/Umbraco.Core/Services/Implement/DataTypeService.cs
@@ -262,7 +262,7 @@ namespace Umbraco.Core.Services.Implement
/// Gets a by its control Id
///
/// Alias of the property editor
- /// Collection of objects with a matching contorl id
+ /// Collection of objects with a matching control id
public IEnumerable GetByEditorAlias(string propertyEditorAlias)
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
@@ -330,7 +330,7 @@ namespace Umbraco.Core.Services.Implement
/// Saves an
///
/// to save
- /// Id of the user issueing the save
+ /// Id of the user issuing the save
public void Save(IDataType dataType, int userId = 0)
{
dataType.CreatorId = userId;
@@ -362,7 +362,7 @@ namespace Umbraco.Core.Services.Implement
/// Saves a collection of
///
/// to save
- /// Id of the user issueing the save
+ /// Id of the user issuing the save
public void Save(IEnumerable dataTypeDefinitions, int userId = 0)
{
Save(dataTypeDefinitions, userId, true);
@@ -372,7 +372,7 @@ namespace Umbraco.Core.Services.Implement
/// Saves a collection of
///
/// to save
- /// Id of the user issueing the save
+ /// Id of the user issuing the save
/// Boolean indicating whether or not to raise events
public void Save(IEnumerable dataTypeDefinitions, int userId, bool raiseEvents)
{
@@ -412,7 +412,7 @@ namespace Umbraco.Core.Services.Implement
/// all the data that references this .
///
/// to delete
- /// Optional Id of the user issueing the deletion
+ /// Optional Id of the user issuing the deletion
public void Delete(IDataType dataType, int userId = 0)
{
using (var scope = ScopeProvider.CreateScope())
@@ -444,7 +444,7 @@ namespace Umbraco.Core.Services.Implement
// so... we are modifying content types here. the service will trigger Deleted event,
// which will propagate to DataTypeCacheRefresher which will clear almost every cache
// there is to clear... and in addition published snapshot caches will clear themselves too, so
- // this is probably safe alghough it looks... weird.
+ // this is probably safe although it looks... weird.
//
// what IS weird is that a content type is losing a property and we do NOT raise any
// content type event... so ppl better listen on the data type events too.
diff --git a/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs b/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs
index 59f031ad6e..aedf3874dd 100644
--- a/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs
+++ b/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Services.Implement
///
/// Returns all logins matching the login info - generally there should only be one but in some cases
- /// there might be more than one depending on if an adminstrator has been editing/removing members
+ /// there might be more than one depending on if an administrator has been editing/removing members
///
///
///
diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs
index bbf5a687a8..da82d38e36 100644
--- a/src/Umbraco.Core/Services/Implement/FileService.cs
+++ b/src/Umbraco.Core/Services/Implement/FileService.cs
@@ -434,7 +434,7 @@ namespace Umbraco.Core.Services.Implement
///
/// Gets a object by its identifier.
///
- /// The identifer of the template.
+ /// The identifier of the template.
/// The object matching the identifier, or null.
public ITemplate GetTemplate(int id)
{
diff --git a/src/Umbraco.Core/Services/Implement/LocalizationService.cs b/src/Umbraco.Core/Services/Implement/LocalizationService.cs
index c972b949d6..678ea10da2 100644
--- a/src/Umbraco.Core/Services/Implement/LocalizationService.cs
+++ b/src/Umbraco.Core/Services/Implement/LocalizationService.cs
@@ -442,7 +442,7 @@ namespace Umbraco.Core.Services.Implement
///
/// This is here to take care of a hack - the DictionaryTranslation model contains an ILanguage reference which we don't want but
/// we cannot remove it because it would be a large breaking change, so we need to make sure it's resolved lazily. This is because
- /// if developers have a lot of dictionary items and translations, the caching and cloning size gets much much larger because of
+ /// if developers have a lot of dictionary items and translations, the caching and cloning size gets much larger because of
/// the large object graphs. So now we don't cache or clone the attached ILanguage
///
private void EnsureDictionaryItemLanguageCallback(IDictionaryItem d)
diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs
index 923b9994d1..9401cefa7d 100644
--- a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs
+++ b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs
@@ -111,7 +111,7 @@ namespace Umbraco.Core.Services.Implement
//convert all areas + keys to a single key with a '/'
result = GetStoredTranslations(xmlSource, culture);
- //merge with the english file in case there's keys in there that don't exist in the local file
+ //merge with the English file in case there's keys in there that don't exist in the local file
var englishCulture = new CultureInfo("en-US");
if (culture.Equals(englishCulture) == false)
{
diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
index 430c2b3d3c..f19dd9f63e 100644
--- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
+++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
@@ -181,7 +181,7 @@ namespace Umbraco.Core.Services.Implement
if (xMasterDoc.Root == null) return;
if (_supplementFileSources != null)
{
- //now load in suplementary
+ //now load in supplementary
var found = _supplementFileSources.Where(x =>
{
var fileName = Path.GetFileName(x.File.FullName);
diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs
index 4c5fea0baa..357352c182 100644
--- a/src/Umbraco.Core/Services/Implement/MediaService.cs
+++ b/src/Umbraco.Core/Services/Implement/MediaService.cs
@@ -451,7 +451,7 @@ namespace Umbraco.Core.Services.Implement
/// An Enumerable list of objects
public IEnumerable GetAncestors(int id)
{
- // intentionnaly not locking
+ // intentionally not locking
var media = GetById(id);
return GetAncestors(media);
}
@@ -547,7 +547,7 @@ namespace Umbraco.Core.Services.Implement
/// Parent object
public IMedia GetParent(int id)
{
- // intentionnaly not locking
+ // intentionally not locking
var media = GetById(id);
return GetParent(media);
}
@@ -1045,7 +1045,7 @@ namespace Umbraco.Core.Services.Implement
// v7 EmptyingRecycleBin and EmptiedRecycleBin events are greatly simplified since
// each deleted items will have its own deleting/deleted events. so, files and such
- // emptying the recycle bin means deleting whetever is in there - do it properly!
+ // emptying the recycle bin means deleting whatever is in there - do it properly!
// are managed by Delete, and not here.
// no idea what those events are for, keep a simplified version
var args = new RecycleBinEventArgs(nodeObjectType, evtMsgs);
@@ -1055,7 +1055,7 @@ namespace Umbraco.Core.Services.Implement
scope.Complete();
return OperationResult.Cancel(evtMsgs);
}
- // emptying the recycle bin means deleting whetever is in there - do it properly!
+ // emptying the recycle bin means deleting whatever is in there - do it properly!
var query = Query().Where(x => x.ParentId == Constants.System.RecycleBinMedia);
var medias = _mediaRepository.Get(query).ToArray();
foreach (var media in medias)
diff --git a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs
index d9ae7e4261..b07bb61dc1 100644
--- a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs
+++ b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs
@@ -23,7 +23,7 @@ namespace Umbraco.Core.Services.Implement
MemberGroupRepository.SavingMemberGroup += MemberGroupRepository_SavingMemberGroup;
}
- #region Proxied event handlers
+ #region Proxy event handlers
void MemberGroupRepository_SavingMemberGroup(IMemberGroupRepository sender, SaveEventArgs e)
{
diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs
index 214882a8f2..a4aedec438 100644
--- a/src/Umbraco.Core/Services/Implement/NotificationService.cs
+++ b/src/Umbraco.Core/Services/Implement/NotificationService.cs
@@ -77,7 +77,7 @@ namespace Umbraco.Core.Services.Implement
//exit if there are no entities
if (entitiesL.Count == 0) return;
- //put all entity's paths into a list with the same indicies
+ //put all entity's paths into a list with the same indices
var paths = entitiesL.Select(x => x.Path.Split(',').Select(int.Parse).ToArray()).ToArray();
// lazily get versions
@@ -301,7 +301,7 @@ namespace Umbraco.Core.Services.Implement
{
if (!_contentSection.DisableHtmlEmail)
{
- //create the html summary for invariant content
+ //create the HTML summary for invariant content
//list all of the property values like we used to
summary.Append("
");
@@ -318,7 +318,7 @@ namespace Umbraco.Core.Services.Implement
var oldProperty = oldDoc.Properties[p.PropertyType.Alias];
oldText = oldProperty.GetValue() != null ? oldProperty.GetValue().ToString() : "";
- // replace html with char equivalent
+ // replace HTML with char equivalent
ReplaceHtmlSymbols(ref oldText);
ReplaceHtmlSymbols(ref newText);
}
@@ -343,7 +343,7 @@ namespace Umbraco.Core.Services.Implement
if (!_contentSection.DisableHtmlEmail)
{
- //Create the html based summary (ul of culture names)
+ //Create the HTML based summary (ul of culture names)
var culturesChanged = content.CultureInfos.Where(x => x.Value.WasDirty())
.Select(x => x.Key)
diff --git a/src/Umbraco.Core/Services/Implement/PackagingService.cs b/src/Umbraco.Core/Services/Implement/PackagingService.cs
index 24ef818624..9c4c6290a9 100644
--- a/src/Umbraco.Core/Services/Implement/PackagingService.cs
+++ b/src/Umbraco.Core/Services/Implement/PackagingService.cs
@@ -69,10 +69,10 @@ namespace Umbraco.Core.Services.Implement
}
catch (HttpRequestException ex)
{
- throw new ConnectionException("An error occuring downloading the package from " + url, ex);
+ throw new ConnectionException("An error occurring downloading the package from " + url, ex);
}
- //successfull
+ //successful
if (bytes.Length > 0)
{
var packagePath = IOHelper.MapPath(SystemDirectories.Packages);
diff --git a/src/Umbraco.Core/Services/Implement/RelationService.cs b/src/Umbraco.Core/Services/Implement/RelationService.cs
index 4d610da4f9..dc9693766f 100644
--- a/src/Umbraco.Core/Services/Implement/RelationService.cs
+++ b/src/Umbraco.Core/Services/Implement/RelationService.cs
@@ -381,7 +381,7 @@ namespace Umbraco.Core.Services.Implement
/// The created
public IRelation Relate(int parentId, int childId, IRelationType relationType)
{
- // Ensure that the RelationType has an indentity before using it to relate two entities
+ // Ensure that the RelationType has an identity before using it to relate two entities
if (relationType.HasIdentity == false)
Save(relationType);
diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Core/Services/Implement/UserService.cs
index 4d01b97ad8..1a88464231 100644
--- a/src/Umbraco.Core/Services/Implement/UserService.cs
+++ b/src/Umbraco.Core/Services/Implement/UserService.cs
@@ -929,7 +929,7 @@ namespace Umbraco.Core.Services.Implement
/// Get explicitly assigned permissions for a user and optional node ids
///
/// User to retrieve permissions for
- /// Specifiying nothing will return all permissions for all nodes
+ /// Specifying nothing will return all permissions for all nodes
/// An enumerable list of
public EntityPermissionCollection GetPermissions(IUser user, params int[] nodeIds)
{
@@ -946,7 +946,7 @@ namespace Umbraco.Core.Services.Implement
///
/// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set
///
- /// Specifiying nothing will return all permissions for all nodes
+ /// Specifying nothing will return all permissions for all nodes
/// An enumerable list of
private IEnumerable GetPermissions(IReadOnlyUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds)
{
@@ -965,7 +965,7 @@ namespace Umbraco.Core.Services.Implement
///
/// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set
///
- /// Specifiying nothing will return all permissions for all nodes
+ /// Specifying nothing will return all permissions for all nodes
/// An enumerable list of
public EntityPermissionCollection GetPermissions(IUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds)
{
@@ -1073,7 +1073,7 @@ namespace Umbraco.Core.Services.Implement
{
if (entityPermission.IsDefaultPermissions == false)
{
- //explicit permision found so we'll append it and move on, the collection is a hashset anyways
+ //explicit permission found so we'll append it and move on, the collection is a hashset anyways
//so only supports adding one element per groupid/contentid
resultPermissions.Add(entityPermission);
added = true;
diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs
index b41e7739ba..51fdb7e8e3 100644
--- a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs
+++ b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs
@@ -56,7 +56,7 @@ namespace Umbraco.Core.Services
}
///
- /// Convert an array of strings to a dictionary of indicies -> values
+ /// Convert an array of strings to a dictionary of indices -> values
///
///
///
diff --git a/src/Umbraco.Core/Services/OperationResultType.cs b/src/Umbraco.Core/Services/OperationResultType.cs
index 01d0434b87..8ad24aafb8 100644
--- a/src/Umbraco.Core/Services/OperationResultType.cs
+++ b/src/Umbraco.Core/Services/OperationResultType.cs
@@ -5,7 +5,7 @@
///
public enum OperationResultType : byte
{
- // all "ResultType" enums must be byte-based, and declare Failed = 128, and declare
+ // all "ResultType" enum's must be byte-based, and declare Failed = 128, and declare
// every failure codes as >128 - see OperationResult and OperationResultType for details.
///
diff --git a/src/Umbraco.Core/Services/PublishResultType.cs b/src/Umbraco.Core/Services/PublishResultType.cs
index acf2b43951..418e5c0896 100644
--- a/src/Umbraco.Core/Services/PublishResultType.cs
+++ b/src/Umbraco.Core/Services/PublishResultType.cs
@@ -5,7 +5,7 @@
///
public enum PublishResultType : byte
{
- // all "ResultType" enums must be byte-based, and declare Failed = 128, and declare
+ // all "ResultType" enum's must be byte-based, and declare Failed = 128, and declare
// every failure codes as >128 - see OperationResult and OperationResultType for details.
#region Success - Publish
diff --git a/src/Umbraco.Core/Services/UserServiceExtensions.cs b/src/Umbraco.Core/Services/UserServiceExtensions.cs
index 7e392ffb39..31c446352e 100644
--- a/src/Umbraco.Core/Services/UserServiceExtensions.cs
+++ b/src/Umbraco.Core/Services/UserServiceExtensions.cs
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Services
///
/// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set
///
- /// Specifiying nothing will return all permissions for all nodes
+ /// Specifying nothing will return all permissions for all nodes
/// An enumerable list of
public static EntityPermissionCollection GetPermissions(this IUserService service, IUserGroup group, bool fallbackToDefaultPermissions, params int[] nodeIds)
{
diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs
index b6a1103097..463e5a6a5c 100644
--- a/src/Umbraco.Core/StringExtensions.cs
+++ b/src/Umbraco.Core/StringExtensions.cs
@@ -82,7 +82,7 @@ namespace Umbraco.Core
}
///
- /// Based on the input string, this will detect if the strnig is a JS path or a JS snippet.
+ /// Based on the input string, this will detect if the string is a JS path or a JS snippet.
/// If a path cannot be determined, then it is assumed to be a snippet the original text is returned
/// with an invalid attempt, otherwise a valid attempt is returned with the resolved path
///
@@ -197,7 +197,7 @@ namespace Umbraco.Core
///
public static string CleanForXss(this string input, params char[] ignoreFromClean)
{
- //remove any html
+ //remove any HTML
input = input.StripHtml();
//strip out any potential chars involved with XSS
return input.ExceptChars(new HashSet(CleanForXssChars.Except(ignoreFromClean)));
@@ -314,7 +314,7 @@ namespace Umbraco.Core
return decryptedValue.ToString();
}
- //this is from SqlMetal and just makes it a bit of fun to allow pluralisation
+ //this is from SqlMetal and just makes it a bit of fun to allow pluralization
public static string MakePluralName(this string name)
{
if ((name.EndsWith("x", StringComparison.OrdinalIgnoreCase) || name.EndsWith("ch", StringComparison.OrdinalIgnoreCase)) || (name.EndsWith("s", StringComparison.OrdinalIgnoreCase) || name.EndsWith("sh", StringComparison.OrdinalIgnoreCase)))
@@ -532,10 +532,10 @@ namespace Umbraco.Core
}
///
- /// Strips all html from a string.
+ /// Strips all HTML from a string.
///
/// The text.
- /// Returns the string without any html tags.
+ /// Returns the string without any HTML tags.
public static string StripHtml(this string text)
{
const string pattern = @"<(.|\n)*?>";
@@ -723,7 +723,7 @@ namespace Umbraco.Core
///
/// Generates a hash of a string based on the FIPS compliance setting.
///
- /// Referrs to itself
+ /// Refers to itself
/// The hashed string
public static string GenerateHash(this string str)
{
@@ -735,7 +735,7 @@ namespace Umbraco.Core
///
/// Converts the string to MD5
///
- /// Referrs to itself
+ /// Refers to itself
/// The MD5 hashed string
public static string ToMd5(this string stringToConvert)
{
@@ -745,7 +745,7 @@ namespace Umbraco.Core
///
/// Converts the string to SHA1
///
- /// referrs to itself
+ /// refers to itself
/// The SHA1 hashed string
public static string ToSHA1(this string stringToConvert)
{
@@ -754,7 +754,7 @@ namespace Umbraco.Core
/// Generate a hash of a string based on the hashType passed in
///
- /// Referrs to itself
+ /// Refers to itself
/// String with the hash type. See remarks section of the CryptoConfig Class in MSDN docs for a list of possible values.
/// The hashed string
private static string GenerateHash(this string str, string hashType)
@@ -773,7 +773,7 @@ namespace Umbraco.Core
//create a StringBuilder object
var stringBuilder = new StringBuilder();
- //loop to each each byte
+ //loop to each byte
foreach (var b in hashedByteArray)
{
//append it to our StringBuilder
@@ -1034,7 +1034,7 @@ namespace Umbraco.Core
}
///
- /// Returns a new string in which all occurences of specified strings are replaced by other specified strings.
+ /// Returns a new string in which all occurrences of specified strings are replaced by other specified strings.
///
/// The string to filter.
/// The replacements definition.
@@ -1052,7 +1052,7 @@ namespace Umbraco.Core
}
///
- /// Returns a new string in which all occurences of specified characters are replaced by a specified character.
+ /// Returns a new string in which all occurrences of specified characters are replaced by a specified character.
///
/// The string to filter.
/// The characters to replace.
@@ -1219,7 +1219,7 @@ namespace Umbraco.Core
/// Splits a Pascal cased string into a phrase separated by spaces.
///
/// The text to split.
- /// The splitted text.
+ /// The split text.
public static string SplitPascalCasing(this string phrase)
{
return Current.ShortStringHelper.SplitPascalCasing(phrase, ' ');
@@ -1270,7 +1270,7 @@ namespace Umbraco.Core
/// Updated string
public static string Replace(this string source, string oldString, string newString, StringComparison stringComparison)
{
- // This initialisation ensures the first check starts at index zero of the source. On successive checks for
+ // This initialization ensures the first check starts at index zero of the source. On successive checks for
// a match, the source is skipped to immediately after the last replaced occurrence for efficiency
// and to avoid infinite loops when oldString and newString compare equal.
int index = -1 * newString.Length;
@@ -1281,7 +1281,7 @@ namespace Umbraco.Core
// Remove the old text.
source = source.Remove(index, oldString.Length);
- // Add the replacemenet text.
+ // Add the replacement text.
source = source.Insert(index, newString);
}
@@ -1357,7 +1357,7 @@ namespace Umbraco.Core
///
/// The string to check
/// The collection of strings to check are contained within the first string
- /// The type of comparision to perform - defaults to
+ /// The type of comparison to perform - defaults to
/// True if any of the needles are contained with haystack; otherwise returns false
/// Added fix to ensure the comparison is used - see http://issues.umbraco.org/issue/U4-11313
public static bool ContainsAny(this string haystack, IEnumerable needles, StringComparison comparison = StringComparison.CurrentCulture)
diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs
index 84ab0de585..6361186604 100644
--- a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs
+++ b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs
@@ -47,7 +47,7 @@ namespace Umbraco.Core.Strings
#region Filters
- // ok to be static here because it's not configureable in any way
+ // ok to be static here because it's not configurable in any way
private static readonly char[] InvalidFileNameChars =
Path.GetInvalidFileNameChars()
.Union("!*'();:@&=+$,/?%#[]-~{}\"<>\\^`| ".ToCharArray())
@@ -574,7 +574,7 @@ namespace Umbraco.Core.Strings
///
/// The text to split.
/// The separator, which defaults to a whitespace.
- /// The splitted text.
+ /// The split text.
/// Supports Utf8 and Ascii strings, not Unicode strings.
// NOTE does not support surrogates pairs at the moment
public virtual string SplitPascalCasing(string text, char separator)
diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs
index 2bbade0fd8..f75b8e4d1f 100644
--- a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs
+++ b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs
@@ -188,7 +188,7 @@ namespace Umbraco.Core.Strings
public bool GreedyAcronyms { get; set; }
// the separator char
- // but then how can we tell we dont want any?
+ // but then how can we tell we don't want any?
public char Separator { get; set; }
// extends the config
diff --git a/src/Umbraco.Core/Strings/Diff.cs b/src/Umbraco.Core/Strings/Diff.cs
index 1993b8f666..6cd4985ead 100644
--- a/src/Umbraco.Core/Strings/Diff.cs
+++ b/src/Umbraco.Core/Strings/Diff.cs
@@ -76,10 +76,10 @@ namespace Umbraco.Core.Strings
}
///
- /// Find the difference in 2 texts, comparing by textlines.
+ /// Find the difference in 2 texts, comparing by text lines.
///
- /// A-version of the text (usualy the old one)
- /// B-version of the text (usualy the new one)
+ /// A-version of the text (usually the old one)
+ /// B-version of the text (usually the new one)
/// Returns a array of Items that describe the differences.
public static Item[] DiffText(string textA, string textB)
{
@@ -87,12 +87,12 @@ namespace Umbraco.Core.Strings
} // DiffText
///
- /// Find the difference in 2 texts, comparing by textlines.
+ /// Find the difference in 2 texts, comparing by text lines.
/// This method uses the DiffInt internally by 1st converting the string into char codes
/// then uses the diff int method
///
- /// A-version of the text (usualy the old one)
- /// B-version of the text (usualy the new one)
+ /// A-version of the text (usually the old one)
+ /// B-version of the text (usually the new one)
/// Returns a array of Items that describe the differences.
public static Item[] DiffText1(string textA, string textB)
{
@@ -101,17 +101,17 @@ namespace Umbraco.Core.Strings
///
- /// Find the difference in 2 text documents, comparing by textlines.
+ /// Find the difference in 2 text documents, comparing by text lines.
/// The algorithm itself is comparing 2 arrays of numbers so when comparing 2 text documents
/// each line is converted into a (hash) number. This hash-value is computed by storing all
- /// textlines into a common hashtable so i can find dublicates in there, and generating a
- /// new number each time a new textline is inserted.
+ /// text lines into a common Hashtable so i can find duplicates in there, and generating a
+ /// new number each time a new text line is inserted.
///
- /// A-version of the text (usualy the old one)
- /// B-version of the text (usualy the new one)
- /// When set to true, all leading and trailing whitespace characters are stripped out before the comparation is done.
- /// When set to true, all whitespace characters are converted to a single space character before the comparation is done.
- /// When set to true, all characters are converted to their lowercase equivivalence before the comparation is done.
+ /// A-version of the text (usually the old one)
+ /// B-version of the text (usually the new one)
+ /// When set to true, all leading and trailing whitespace characters are stripped out before the comparison is done.
+ /// When set to true, all whitespace characters are converted to a single space character before the comparison is done.
+ /// When set to true, all characters are converted to their lowercase equivalence before the comparison is done.
/// Returns a array of Items that describe the differences.
public static Item[] DiffText(string textA, string textB, bool trimSpace, bool ignoreSpace, bool ignoreCase)
{
@@ -124,7 +124,7 @@ namespace Umbraco.Core.Strings
// The B-Version of the data (modified data) to be compared.
var dataB = new DiffData(DiffCodes(textB, h, trimSpace, ignoreSpace, ignoreCase));
- h = null; // free up hashtable memory (maybe)
+ h = null; // free up Hashtable memory (maybe)
var max = dataA.Length + dataB.Length + 1;
// vector for the (0,0) to (x,y) search
@@ -193,8 +193,8 @@ namespace Umbraco.Core.Strings
///
/// Find the difference in 2 arrays of integers.
///
- /// A-version of the numbers (usualy the old one)
- /// B-version of the numbers (usualy the new one)
+ /// A-version of the numbers (usually the old one)
+ /// B-version of the numbers (usually the new one)
/// Returns a array of Items that describe the differences.
public static Item[] DiffInt(int[] arrayA, int[] arrayB)
{
@@ -216,11 +216,11 @@ namespace Umbraco.Core.Strings
///
- /// This function converts all textlines of the text into unique numbers for every unique textline
+ /// This function converts all text lines of the text into unique numbers for every unique text line
/// so further work can work only with simple numbers.
///
/// the input text
- /// This extern initialized hashtable is used for storing all ever used textlines.
+ /// This extern initialized Hashtable is used for storing all ever used text lines.
/// ignore leading and trailing space characters
///
///
@@ -230,7 +230,7 @@ namespace Umbraco.Core.Strings
// get all codes of the text
var lastUsedCode = h.Count;
- // strip off all cr, only use lf as textline separator.
+ // strip off all cr, only use lf as text line separator.
aText = aText.Replace("\r", "");
var lines = aText.Split('\n');
@@ -393,7 +393,7 @@ namespace Umbraco.Core.Strings
///
- /// This is the divide-and-conquer implementation of the longes common-subsequence (LCS)
+ /// This is the divide-and-conquer implementation of the longest common-subsequence (LCS)
/// algorithm.
/// The published algorithm passes recursively parts of the A and B sequences.
/// To avoid copying these arrays the lower and upper bounds are passed while the sequences stay constant.
@@ -408,15 +408,15 @@ namespace Umbraco.Core.Strings
/// a vector for the (u,v) to (N,M) search. Passed as a parameter for speed reasons.
private static void Lcs(DiffData dataA, int lowerA, int upperA, DiffData dataB, int lowerB, int upperB, int[] downVector, int[] upVector)
{
- // Debug.Write(2, "LCS", String.Format("Analyse the box: A[{0}-{1}] to B[{2}-{3}]", LowerA, UpperA, LowerB, UpperB));
+ // Debug.Write(2, "LCS", String.Format("Analyze the box: A[{0}-{1}] to B[{2}-{3}]", LowerA, UpperA, LowerB, UpperB));
- // Fast walkthrough equal lines at the start
+ // Fast walk through equal lines at the start
while (lowerA < upperA && lowerB < upperB && dataA.Data[lowerA] == dataB.Data[lowerB])
{
lowerA++; lowerB++;
}
- // Fast walkthrough equal lines at the end
+ // Fast walk through equal lines at the end
while (lowerA < upperA && lowerB < upperB && dataA.Data[upperA - 1] == dataB.Data[upperB - 1])
{
--upperA; --upperB;
@@ -438,7 +438,7 @@ namespace Umbraco.Core.Strings
}
else
{
- // Find the middle snakea and length of an optimal path for A and B
+ // Find the middle snake and length of an optimal path for A and B
Smsrd smsrd = Sms(dataA, lowerA, upperA, dataB, lowerB, upperB, downVector, upVector);
// Debug.Write(2, "MiddleSnakeData", String.Format("{0},{1}", smsrd.x, smsrd.y));
diff --git a/src/Umbraco.Core/Strings/IShortStringHelper.cs b/src/Umbraco.Core/Strings/IShortStringHelper.cs
index 085b5adb7a..fecbeaaee9 100644
--- a/src/Umbraco.Core/Strings/IShortStringHelper.cs
+++ b/src/Umbraco.Core/Strings/IShortStringHelper.cs
@@ -65,7 +65,7 @@
///
/// The text to split.
/// The separator.
- /// The splitted string.
+ /// The split string.
/// Supports Utf8 and Ascii strings, not Unicode strings.
string SplitPascalCasing(string text, char separator);
diff --git a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs
index 40c9b758d1..f5b4a1cff3 100644
--- a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs
+++ b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs
@@ -3322,7 +3322,7 @@ namespace Umbraco.Core.Strings
// BEGIN CUSTOM TRANSLITERATION OF CYRILIC CHARS
- #region Cyrilic chars
+ #region Cyrillic chars
// russian uppercase "А Б В Г Д Е Ё Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я"
// russian lowercase "а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я"
@@ -3340,7 +3340,7 @@ namespace Umbraco.Core.Strings
// todo
// transliterates Анастасия as Anastasiya, and not Anastasia
// Ольга --> Ol'ga, Татьяна --> Tat'yana -- that's bad (?)
- // Note: should ä (german umlaut) become a or ae ?
+ // Note: should ä (German umlaut) become a or ae ?
case '\u0410': // А
output[opos++] = 'A';
diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs
index fa59fe2e9c..a34644e6a1 100644
--- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs
+++ b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs
@@ -153,7 +153,7 @@ namespace Umbraco.Core.Sync
ReadLastSynced(); // get _lastId
using (var scope = ScopeProvider.CreateScope())
{
- EnsureInstructions(scope.Database); // reset _lastId if instrs are missing
+ EnsureInstructions(scope.Database); // reset _lastId if instructions are missing
Initialize(scope.Database); // boot
scope.Complete();
@@ -326,7 +326,7 @@ namespace Umbraco.Core.Sync
var processed = new HashSet();
//It would have been nice to do this in a Query instead of Fetch using a data reader to save
- // some memory however we cannot do thta because inside of this loop the cache refreshers are also
+ // some memory however we cannot do that because inside of this loop the cache refreshers are also
// performing some lookups which cannot be done with an active reader open
foreach (var dto in database.Fetch(topSql))
{
@@ -405,7 +405,7 @@ namespace Umbraco.Core.Sync
}
//catch (ThreadAbortException ex)
//{
- // //This will occur if the instructions processing is taking too long since this is occuring on a request thread.
+ // //This will occur if the instructions processing is taking too long since this is occurring on a request thread.
// // Or possibly if IIS terminates the appdomain. In any case, we should deal with this differently perhaps...
//}
catch (Exception ex)
@@ -624,7 +624,7 @@ namespace Umbraco.Core.Sync
///
///
///
- /// Returns true if all instructions were processed, otherwise false if the processing was interupted (i.e. app shutdown)
+ /// Returns true if all instructions were processed, otherwise false if the processing was interrupted (i.e. app shutdown)
///
private bool NotifyRefreshers(IEnumerable instructions, HashSet processed)
{
diff --git a/src/Umbraco.Core/Sync/IServerMessenger.cs b/src/Umbraco.Core/Sync/IServerMessenger.cs
index 9005a89217..37d08723f4 100644
--- a/src/Umbraco.Core/Sync/IServerMessenger.cs
+++ b/src/Umbraco.Core/Sync/IServerMessenger.cs
@@ -25,7 +25,7 @@ namespace Umbraco.Core.Sync
void PerformRefresh(ICacheRefresher refresher, string jsonPayload);
///
- /// Notifies the distributed cache of specifieds item invalidation, for a specified .
+ /// Notifies the distributed cache of specified item invalidation, for a specified .
///
/// The type of the invalidated items.
/// The ICacheRefresher.
@@ -34,7 +34,7 @@ namespace Umbraco.Core.Sync
void PerformRefresh(ICacheRefresher refresher, Func getNumericId, params T[] instances);
///
- /// Notifies the distributed cache of specifieds item invalidation, for a specified .
+ /// Notifies the distributed cache of specified item invalidation, for a specified .
///
/// The type of the invalidated items.
/// The ICacheRefresher.
diff --git a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs b/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs
index 5ad9140811..38ba2ce189 100644
--- a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs
+++ b/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs
@@ -6,7 +6,7 @@ using Umbraco.Core.IO;
namespace Umbraco.Core.Sync
{
///
- /// The client Soap service for making distrubuted cache calls between servers
+ /// The client Soap service for making distributed cache calls between servers
///
[WebServiceBinding(Name = "CacheRefresherSoap", Namespace = "http://umbraco.org/webservices/")]
[Obsolete("Legacy load balancing is obsolete and should be removed")]
diff --git a/src/Umbraco.Core/TypeExtensions.cs b/src/Umbraco.Core/TypeExtensions.cs
index 6abc2bffc2..56b2026afb 100644
--- a/src/Umbraco.Core/TypeExtensions.cs
+++ b/src/Umbraco.Core/TypeExtensions.cs
@@ -22,7 +22,7 @@ namespace Umbraco.Core
///
///
///
- /// Currenty this will only work for ProperCase and camelCase properties, see the TODO below to enable complete case insensitivity
+ /// Currently this will only work for ProperCase and camelCase properties, see the TODO below to enable complete case insensitivity
///
internal static Attempt