Corrects spelling of some comments and method names (#398)

* Corrects spelling of some comments and method names

* Correctly renames one more instance of wrongly spelled enableNavigationInteception
This commit is contained in:
Miha Markič 2018-03-28 17:15:27 +02:00 committed by Ryan Nowak
parent f6479a75cb
commit 9a01ec5743
5 changed files with 18 additions and 18 deletions

View File

@ -11,7 +11,7 @@ registerFunction(`${registeredFunctionPrefix}.getLocationHref`,
registerFunction(`${registeredFunctionPrefix}.getBaseURI`,
() => document.baseURI ? platform.toDotNetString(document.baseURI) : null);
registerFunction(`${registeredFunctionPrefix}.enableNavigationInteception`, () => {
registerFunction(`${registeredFunctionPrefix}.enableNavigationInterception`, () => {
if (hasRegisteredEventListeners) {
return;
}

View File

@ -30,12 +30,12 @@ namespace Microsoft.AspNetCore.Blazor.Browser.Services
{
add
{
EnsureNavigationInteceptionEnabled();
EnsureNavigationInterceptionEnabled();
_onLocationChanged += value;
}
remove
{
// We could consider deactivating the JS-side enableNavigationInteception
// We could consider deactivating the JS-side enableNavigationInterception
// if there are no remaining listeners, but we don't need that currently.
// If we ever do that, will also need to change the logic inside GetAbsoluteUri
// so it knows not to continue using the cached URI.
@ -133,16 +133,16 @@ namespace Microsoft.AspNetCore.Blazor.Browser.Services
_onLocationChanged?.Invoke(null, newAbsoluteUri);
}
private static void EnsureNavigationInteceptionEnabled()
private static void EnsureNavigationInterceptionEnabled()
{
// Don't need thread safety because:
// (1) there's only one UI thread
// (2) doesn't matter if we call enableNavigationInteception more than once anyway
// (2) doesn't matter if we call enableNavigationInterception more than once anyway
if (!_hasEnabledNavigationInterception)
{
_hasEnabledNavigationInterception = true;
RegisteredFunction.InvokeUnmarshalled<object>(
$"{_functionPrefix}.enableNavigationInteception");
$"{_functionPrefix}.enableNavigationInterception");
}
}

View File

@ -554,7 +554,7 @@ namespace SimpleJson
/// The object.
/// </param>
/// <returns>
/// Returns true if successfull otherwise false.
/// Returns true if successful otherwise false.
/// </returns>
[SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification="Need to support .NET 2")]
public static bool TryDeserializeObject(string json, out object obj)
@ -1260,7 +1260,7 @@ namespace SimpleJson
public PocoJsonSerializerStrategy()
{
ConstructorCache = new ReflectionUtils.ThreadSafeDictionary<Type, ReflectionUtils.ConstructorDelegate>(ContructorDelegateFactory);
ConstructorCache = new ReflectionUtils.ThreadSafeDictionary<Type, ReflectionUtils.ConstructorDelegate>(ConstructorDelegateFactory);
GetCache = new ReflectionUtils.ThreadSafeDictionary<Type, IDictionary<string, ReflectionUtils.GetDelegate>>(GetterValueFactory);
SetCache = new ReflectionUtils.ThreadSafeDictionary<Type, IDictionary<string, KeyValuePair<Type, ReflectionUtils.SetDelegate>>>(SetterValueFactory);
}
@ -1270,11 +1270,11 @@ namespace SimpleJson
return clrPropertyName;
}
internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key)
internal virtual ReflectionUtils.ConstructorDelegate ConstructorDelegateFactory(Type key)
{
// We need List<T>(int) constructor so that DeserializeObject method will work for generating IList-declared values
var needsCapacityArgument = key.IsArray || key.IsConstructedGenericType && key.GetGenericTypeDefinition() == typeof(List<>);
return ReflectionUtils.GetContructor(key, needsCapacityArgument ? ArrayConstructorParameterTypes : EmptyTypes);
return ReflectionUtils.GetConstructor(key, needsCapacityArgument ? ArrayConstructorParameterTypes : EmptyTypes);
}
internal virtual IDictionary<string, ReflectionUtils.GetDelegate> GetterValueFactory(Type type)
@ -1456,7 +1456,7 @@ namespace SimpleJson
foreach (object o in jsonObject)
list[i++] = DeserializeObject(o, type.GetElementType());
}
else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type))
else if (ReflectionUtils.IsTypeGenericCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type))
{
Type innerType = ReflectionUtils.GetGenericListElementType(type);
list = (IList)(ConstructorCache[type] ?? ConstructorCache[typeof(List<>).MakeGenericType(innerType)])(jsonObject.Count);
@ -1694,7 +1694,7 @@ namespace SimpleJson
return GetTypeInfo(type).IsGenericType;
}
public static bool IsTypeGenericeCollectionInterface(Type type)
public static bool IsTypeGenericCollectionInterface(Type type)
{
if (!IsTypeGeneric(type))
return false;
@ -1821,7 +1821,7 @@ namespace SimpleJson
#endif
}
public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo)
public static ConstructorDelegate GetConstructor(ConstructorInfo constructorInfo)
{
#if SIMPLE_JSON_NO_LINQ_EXPRESSION
return GetConstructorByReflection(constructorInfo);
@ -1830,7 +1830,7 @@ namespace SimpleJson
#endif
}
public static ConstructorDelegate GetContructor(Type type, params Type[] argsType)
public static ConstructorDelegate GetConstructor(Type type, params Type[] argsType)
{
#if SIMPLE_JSON_NO_LINQ_EXPRESSION
return GetConstructorByReflection(type, argsType);

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Blazor.Rendering
/// Constructs an instance of <see cref="ComponentState"/>.
/// </summary>
/// <param name="renderer">The <see cref="Renderer"/> with which the new instance should be associated.</param>
/// <param name="componentId">The externally visible identifer for the <see cref="IComponent"/>. The identifier must be unique in the context of the <see cref="Renderer"/>.</param>
/// <param name="componentId">The externally visible identifier for the <see cref="IComponent"/>. The identifier must be unique in the context of the <see cref="Renderer"/>.</param>
/// <param name="component">The <see cref="IComponent"/> whose state is being tracked.</param>
public ComponentState(Renderer renderer, int componentId, IComponent component)
{

View File

@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Blazor.Routing
/// /Route/With/{parameter} is more specific than /{multiple}/With/{parameters}
/// /Product/{id:int} is more specific than /Product/{id}
///
/// Routes can be ambigous if:
/// Routes can be ambiguous if:
/// They are composed of literals and those literals have the same values (case insensitive)
/// They are composed of a mix of literals and parameters, in the same relative order and the
/// literals have the same values.
@ -62,9 +62,9 @@ namespace Microsoft.AspNetCore.Blazor.Routing
/// To calculate the precedence we sort the list of routes as follows:
/// * Shorter routes go first.
/// * A literal wins over a parameter in precedence.
/// * For literals with different values (case insenitive) we choose the lexical order
/// * For literals with different values (case insensitive) we choose the lexical order
/// * For parameters with different numbers of constraints, the one with more wins
/// If we get to the end of the comparison routing we've detected an ambigous pair of routes.
/// If we get to the end of the comparison routing we've detected an ambiguous pair of routes.
internal static int RouteComparison(RouteEntry x, RouteEntry y)
{
var xTemplate = x.Template;