Contributing: Fixed some typos (#18331)

This commit is contained in:
Maher Jendoubi 2020-01-14 17:58:52 +01:00 committed by Justin Kotalik
parent 6dd3d6ec49
commit 116799fa70
58 changed files with 285 additions and 285 deletions

View File

@ -54,7 +54,7 @@ Write-Output "Watching processes $($CandidateProcessNames -join ', ')";
# This script registers as a scheduled job. This scheduled job executes after $WakeTime.
# When the scheduled job executes, it runs procdump on all alive processes whose name matches $CandidateProcessNames.
# The dumps are placed in $ProcDumpOutputPath
# If the build completes sucessfully in less than $WakeTime, a final step unregisters the job.
# If the build completes successfully in less than $WakeTime, a final step unregisters the job.
# Create a unique identifier for the job name
$JobName = "CaptureDumps" + (New-Guid).ToString("N");

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
private bool _disposing = false;
/// <summary>
/// Notifies when a rendering exception occured.
/// Notifies when a rendering exception occurred.
/// </summary>
public event EventHandler<Exception> UnhandledException;

View File

@ -302,7 +302,7 @@ namespace Microsoft.AspNetCore.Components.Server
LoggerMessage.Define<CircuitId, string, string>(LogLevel.Debug, new EventId(7, "CreatedCircuit"), "Created circuit '{CircuitId}' with secret '{CircuitIdSecret}' for '{ConnectionId}'");
private static readonly Action<ILogger, string, Exception> _invalidCircuitId =
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(8, "InvalidCircuitId"), "ConnectAsync recieved an invalid circuit id '{CircuitIdSecret}'");
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(8, "InvalidCircuitId"), "ConnectAsync received an invalid circuit id '{CircuitIdSecret}'");
public static void ReceivedConfirmationForBatch(ILogger logger, long batchId) => _receivedConfirmationForBatch(logger, batchId, null);

View File

@ -90,7 +90,7 @@ namespace BlazingPizza.Server
},
new Topping()
{
Name = "Fresh tomatos",
Name = "Fresh tomatoes",
Price = 1.50m,
},
new Topping()

View File

@ -147,7 +147,7 @@ namespace Microsoft.AspNetCore.JsonPatch.IntegrationTests
}
[Fact]
public void TestStringProperty_IsSucessful()
public void TestStringProperty_IsSuccessful()
{
// Arrange
var targetObject = new

View File

@ -106,7 +106,7 @@ namespace Microsoft.AspNetCore.JsonPatch.IntegrationTests
}
[Fact]
public void TestIntegerProperty_IsSucessful()
public void TestIntegerProperty_IsSuccessful()
{
// Arrange
dynamic targetObject = new ExpandoObject();

View File

@ -91,7 +91,7 @@ namespace Microsoft.AspNetCore.Hosting
var startTimestamp = context.StartTimestamp;
long currentTimestamp = 0;
// If startTimestamp was 0, then Information logging wasn't enabled at for this request (and calcuated time will be wildly wrong)
// If startTimestamp was 0, then Information logging wasn't enabled at for this request (and calculated time will be wildly wrong)
// Is used as proxy to reduce calls to virtual: _logger.IsEnabled(LogLevel.Information)
if (startTimestamp != 0)
{
@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Hosting
if (exception == null)
{
// No exception was thrown, request was sucessful
// No exception was thrown, request was successful
if (_diagnosticListener.IsEnabled(DeprecatedDiagnosticsEndRequestKey))
{
// Diagnostics is enabled for EndRequest, but it may not be for BeginRequest
@ -317,7 +317,7 @@ namespace Microsoft.AspNetCore.Hosting
private void StopActivity(Activity activity, HttpContext httpContext)
{
// Stop sets the end time if it was unset, but we want it set before we issue the write
// so we do it now.
// so we do it now.
if (activity.Duration == TimeSpan.Zero)
{
activity.SetEndTime(DateTime.UtcNow);

View File

@ -383,7 +383,7 @@ namespace Microsoft.AspNetCore.Routing
LogLevel.Debug,
EventIds.TemplateFailedExpansion,
"Failed to process the template {Template} for {Endpoint}. " +
"The failure occured while expanding the template with values {Values} " +
"The failure occurred while expanding the template with values {Values} " +
"This is usually due to a missing or empty value in a complex segment");
private static readonly Action<ILogger, IEnumerable<string>, string, Exception> _linkGenerationSucceeded = LoggerMessage.Define<IEnumerable<string>, string>(
@ -442,7 +442,7 @@ namespace Microsoft.AspNetCore.Routing
}
}
public static void LinkGenerationSucceeded(ILogger logger, IEnumerable<Endpoint> endpoints, string uri)
public static void LinkGenerationSucceeded(ILogger logger, IEnumerable<Endpoint> endpoints, string uri)
{
// Checking level again to avoid allocation on the common path
if (logger.IsEnabled(LogLevel.Debug))

View File

@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
{
return Task.CompletedTask;
}
// Route values not supported
[Fact]
public override Task Match_SingleParameter_TrailingSlash()
@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
// Route values not supported
[Fact]
public override Task Match_SingleParameter_WierdNames()
public override Task Match_SingleParameter_WeirdNames()
{
return Task.CompletedTask;
}
@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
[InlineData(null, null, null, null)]
public override Task Match_MultipleParameters(string template, string path, string[] keys, string[] values)
{
GC.KeepAlive(new object [] { template, path, keys, values });
GC.KeepAlive(new object[] { template, path, keys, values });
return Task.CompletedTask;
}

View File

@ -173,7 +173,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
// Historically catchall segments don't match an empty segment, but only if it's
// the first one. So `/a/b//` would match, but `/a//` would not. This is pretty
// wierd and inconsistent with the intent of using a catch all. The DfaMatcher
// weird and inconsistent with the intent of using a catch all. The DfaMatcher
// fixes this issue.
[Theory]
[InlineData("/{a}/{*b=b}", "/a///", new[] { "a", "b", }, new[] { "a", "//" })]
@ -313,7 +313,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
[InlineData("(Controller).mvc", "/(Controller).mvc", new string[] { }, new string[] { })]
[InlineData("Controller.mvc/ ", "/Controller.mvc/ ", new string[] { }, new string[] { })]
[InlineData("Controller.mvc ", "/Controller.mvc ", new string[] { }, new string[] { })]
public virtual async Task Match_WierdCharacterCases(string template, string path, string[] keys, string[] values)
public virtual async Task Match_WeirdCharacterCases(string template, string path, string[] keys, string[] values)
{
// Arrange
var (matcher, endpoint) = CreateMatcher(template);

View File

@ -84,7 +84,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
MatcherAssert.AssertMatch(httpContext, endpoint);
}
// Matchers should operate on the decoded representation - a matcher that calls
// Matchers should operate on the decoded representation - a matcher that calls
// `httpContext.Request.Path.ToString()` will break this test.
[Theory]
[InlineData("/S%mple", "/S%mple")]
@ -239,7 +239,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
}
[Fact]
public virtual async Task Match_SingleParameter_WierdNames()
public virtual async Task Match_SingleParameter_WeirdNames()
{
// Arrange
var (matcher, endpoint) = CreateMatcher("/foo/{ }/{.!$%}/{dynamic.data}");

View File

@ -239,7 +239,7 @@ namespace Microsoft.AspNetCore.Routing.Patterns
}
[Fact]
public void Parse_ComplexSegment_ThreeParametersSeperatedByPeriod()
public void Parse_ComplexSegment_ThreeParametersSeparatedByPeriod()
{
// Arrange
var template = "{p1}.{p2}.{p3}";
@ -352,7 +352,7 @@ namespace Microsoft.AspNetCore.Routing.Patterns
[Theory]
[InlineData(@"{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}}$)}")] // extra }
[InlineData(@"{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}$)}}")] // extra } at the end
[InlineData(@"{{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}$)}")] // extra { at the begining
[InlineData(@"{{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}$)}")] // extra { at the beginning
[InlineData(@"{p1:regex(([}])\w+}")] // Not escaped }
[InlineData(@"{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}$)}")] // Not escaped }
[InlineData(@"{p1:regex(abc)")]
@ -400,7 +400,7 @@ namespace Microsoft.AspNetCore.Routing.Patterns
[InlineData("..{p2?}", "..")]
[InlineData("{p1}.abc.{p2?}", ".abc.")]
[InlineData("{p1}{p2?}", "{p1}")]
public void Parse_ComplexSegment_OptionalParametersSeperatedByPeriod_Invalid(string template, string parameter)
public void Parse_ComplexSegment_OptionalParametersSeparatedByPeriod_Invalid(string template, string parameter)
{
// Act and Assert
ExceptionAssert.Throws<RoutePatternException>(

View File

@ -325,7 +325,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
}
[Fact]
public void Parse_ComplexSegment_ThreeParametersSeperatedByPeriod()
public void Parse_ComplexSegment_ThreeParametersSeparatedByPeriod()
{
// Arrange
var template = "{p1}.{p2}.{p3}";
@ -498,7 +498,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
[Theory]
[InlineData(@"{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}}$)}")] // extra }
[InlineData(@"{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}$)}}")] // extra } at the end
[InlineData(@"{{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}$)}")] // extra { at the begining
[InlineData(@"{{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}}$)}")] // extra { at the beginning
[InlineData(@"{p1:regex(([}])\w+}")] // Not escaped }
[InlineData(@"{p1:regex(^\d{{3}}-\d{{3}}-\d{{4}$)}")] // Not escaped }
[InlineData(@"{p1:regex(abc)")]
@ -550,7 +550,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
[InlineData("{p1}.abc.{p2?}", ".abc.")]
[InlineData("{p1}{p2?}", "{p1}")]
[ReplaceCulture]
public void Parse_ComplexSegment_OptionalParametersSeperatedByPeriod_Invalid(string template, string parameter)
public void Parse_ComplexSegment_OptionalParametersSeparatedByPeriod_Invalid(string template, string parameter)
{
// Act and Assert
ExceptionAssert.Throws<ArgumentException>(

View File

@ -167,7 +167,7 @@ namespace Microsoft.AspNetCore.WebUtilities
// If we're not in the final block, then consume nothing
if (!isFinalBlock)
{
// Don't buffer indefinately
// Don't buffer indefinitely
if ((uint)span.Length > (uint)KeyLengthLimit + (uint)ValueLengthLimit)
{
ThrowKeyOrValueTooLargeException();
@ -236,7 +236,7 @@ namespace Microsoft.AspNetCore.WebUtilities
{
if (!isFinalBlock)
{
// Don't buffer indefinately
// Don't buffer indefinitely
if ((uint)(sequenceReader.Consumed - consumedBytes) > (uint)KeyLengthLimit + (uint)ValueLengthLimit)
{
ThrowKeyOrValueTooLargeException();

View File

@ -85,7 +85,7 @@ namespace Microsoft.AspNetCore.WebUtilities
var anchorIndex = uri.IndexOf('#');
var uriToBeAppended = uri;
var anchorText = "";
// If there is an anchor, then the query string must be inserted before its first occurence.
// If there is an anchor, then the query string must be inserted before its first occurrence.
if (anchorIndex != -1)
{
anchorText = uri.Substring(anchorIndex);

View File

@ -406,7 +406,7 @@ HASH_TABLE<_Record,_Key>::InsertRecord(
)
/*++
This method inserts a node for this record and also empty nodes for paths
in the heirarchy leading upto this path
in the hierarchy leading upto this path
The insert is done under only a read-lock - this is possible by keeping
the hashes in a bucket in increasing order and using interlocked operations

View File

@ -55,7 +55,7 @@ extern "C" {
#define HTTP_INITIALIZE_SERVER 0x00000001
#define HTTP_INITIALIZE_CONFIG 0x00000002
#if _WIN32_WINNT <= 0x0501
#if _WIN32_WINNT <= 0x0501
#define BUILD_IIS_FOR_XP 1
#endif
@ -582,7 +582,7 @@ typedef enum _HTTP_LOGGING_ROLLOVER_TYPE
// log file rollovers happen by GMT time.
//
// HTTP_LOGGING_FLAG_USE_UTF8_CONVERSION - When set the unicode fields
// will be converted to UTF8 multibytes when writting to the log
// will be converted to UTF8 multibytes when writing to the log
// files. When this flag is not present, the local code page
// conversion happens.
//
@ -1736,10 +1736,10 @@ typedef enum _HTTP_RESPONSE_INFO_TYPE
HttpResponseInfoTypeMultipleKnownHeaders,
HttpResponseInfoTypeAuthenticationProperty,
HttpResponseInfoTypeQoSProperty
#if _WIN32_WINNT >= _WIN32_WINNT_WIN7 || BUILD_IIS_FOR_XP
,HttpResponseInfoTypeChannelBind
#endif
#endif
} HTTP_RESPONSE_INFO_TYPE, PHTTP_RESPONSE_INFO_TYPE;

View File

@ -79,7 +79,7 @@ private:
);
//
// Pointer to the begining of the inlined array.
// Pointer to the beginning of the inlined array.
//
PVOID m_pVariables;
SIZE_T m_Alignment;
@ -101,7 +101,7 @@ PER_CPU<T>::Create(
DWORD ObjectCacheLineSize = 0;
DWORD NumberOfProcessors = 0;
PER_CPU<T> * pInstance = NULL;
hr = GetProcessorInformation(&CacheLineSize,
&NumberOfProcessors);
if (FAILED(hr))
@ -140,7 +140,7 @@ PER_CPU<T>::Create(
// The array start in the 2nd cache line.
//
pInstance->m_pVariables = reinterpret_cast<PBYTE>(pInstance) + CacheLineSize;
//
// Pass a disposer for disposing initialized items in case of failure.
//

View File

@ -519,7 +519,7 @@ TREE_HASH_TABLE<_Record>::InsertRecord(
)
/*++
This method inserts a node for this record and also empty nodes for paths
in the heirarchy leading upto this path
in the hierarchy leading upto this path
The insert is done under only a read-lock - this is possible by keeping
the hashes in a bucket in increasing order and using interlocked operations

View File

@ -1637,7 +1637,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1684,7 +1684,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1733,7 +1733,7 @@ Arguments:
Return Value:
The index for the last character occurence in the string.
The index for the last character occurrence in the string.
-1 if not found.

View File

@ -1083,7 +1083,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1130,7 +1130,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1179,7 +1179,7 @@ Arguments:
Return Value:
The index for the last character occurence in the string.
The index for the last character occurrence in the string.
-1 if not found.

View File

@ -20,7 +20,7 @@ enum SETUP_LOG_SEVERITY
//consider using an IIS prefix for Msi* methods - they conflict with MSI apis
//
// Initalize logging once at begining of CA
// Initialize logging once at beginning of CA
//
VOID
@ -31,7 +31,7 @@ IISLogInitialize(
//
// Close logging at end / exit of CA
//
//
VOID
IISLogClose(
@ -40,7 +40,7 @@ IISLogClose(
//
// Writes a message to msi log file
//
//
VOID
IISLogWrite(
IN SETUP_LOG_SEVERITY setupLogSeverity,

View File

@ -72,14 +72,14 @@ namespace Microsoft.AspNetCore.SpaServices
public string SourcePath { get; set; }
/// <summary>
/// Controls wether the development server should be used with a dynamic or fixed port.
/// Controls whether the development server should be used with a dynamic or fixed port.
/// </summary>
public int DevServerPort { get; set; } = default(int);
/// <summary>
/// Gets or sets the name of the package manager executible, (e.g npm,
/// Gets or sets the name of the package manager executable, (e.g npm,
/// yarn) to run the SPA.
///
///
/// The default value is 'npm'.
/// </summary>
public string PackageManagerCommand

View File

@ -61,30 +61,30 @@ $.extend($.fn, {
if ( validator ) {
return validator;
}
validator = new $.validator( options, this[0] );
$.data(this[0], 'validator', validator);
$.data(this[0], 'validator', validator);
if ( validator.settings.onsubmit ) {
// allow suppresing validation by adding a cancel class to the submit button
this.find("input, button").filter(".cancel").click(function() {
validator.cancelSubmit = true;
});
// when a submitHandler is used, capture the submitting button
if (validator.settings.submitHandler) {
this.find("input, button").filter(":submit").click(function() {
validator.submitButton = this;
});
}
// validate the form on submit
this.submit( function( event ) {
if ( validator.settings.debug )
// prevent form submit to be able to see console output
event.preventDefault();
function handle() {
if ( validator.settings.submitHandler ) {
if (validator.submitButton) {
@ -100,7 +100,7 @@ $.extend($.fn, {
}
return true;
}
// prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
@ -118,7 +118,7 @@ $.extend($.fn, {
}
});
}
return validator;
},
// http://docs.jquery.com/Plugins/Validation/valid
@ -140,13 +140,13 @@ $.extend($.fn, {
return valid;
}
},
// attributes: space seperated list of attributes to retrieve and remove
// attributes: space separated list of attributes to retrieve and remove
removeAttrs: function(attributes) {
/// <summary>
/// Remove the specified attributes from the first matched element and return them.
/// </summary>
/// <param name="attributes" type="String">
/// A space-seperated list of attribute names to remove.
/// A space-separated list of attribute names to remove.
/// </param>
var result = {},
@ -170,7 +170,7 @@ $.extend($.fn, {
/// </param>
var element = this[0];
if (command) {
var settings = $.data(element.form, 'validator').settings;
var staticRules = settings.rules;
@ -195,7 +195,7 @@ $.extend($.fn, {
return filtered;
}
}
var data = $.validator.normalizeRules(
$.extend(
{},
@ -204,14 +204,14 @@ $.extend($.fn, {
$.validator.attributeRules(element),
$.validator.staticRules(element)
), element);
// make sure required is at front
if (data.required) {
var param = data.required;
delete data.required;
data = $.extend({required: param}, data);
}
return data;
}
});
@ -247,7 +247,7 @@ $.validator.format = function(source, params) {
/// </param>
/// <returns type="String" />
if ( arguments.length == 1 )
if ( arguments.length == 1 )
return function() {
var args = $.makeArray(arguments);
args.unshift(source);
@ -266,7 +266,7 @@ $.validator.format = function(source, params) {
};
$.extend($.validator, {
defaults: {
messages: {},
groups: {},
@ -282,7 +282,7 @@ $.extend($.validator, {
ignoreTitle: false,
onfocusin: function(element) {
this.lastActive = element;
// hide error label and remove error class on focus if enabled
if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
@ -347,11 +347,11 @@ $.extend($.validator, {
max: $.validator.format("Please enter a value less than or equal to {0}."),
min: $.validator.format("Please enter a value greater than or equal to {0}.")
},
autoCreateRanges: false,
prototype: {
init: function() {
this.labelContainer = $(this.settings.errorLabelContainer);
this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
@ -362,7 +362,7 @@ $.extend($.validator, {
this.pending = {};
this.invalid = {};
this.reset();
var groups = (this.groups = {});
$.each(this.settings.groups, function(key, value) {
$.each(value.split(/\s/), function(index, name) {
@ -373,7 +373,7 @@ $.extend($.validator, {
$.each(rules, function(key, value) {
rules[key] = $.validator.normalizeRule(value);
});
function delegate(event) {
var validator = $.data(this[0].form, "validator"),
eventType = "on" + event.type.replace(/^validate/, "");
@ -403,15 +403,15 @@ $.extend($.validator, {
this.showErrors();
return this.valid();
},
checkForm: function() {
this.prepareForm();
for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
this.check( elements[i] );
}
return this.valid();
return this.valid();
},
// http://docs.jquery.com/Plugins/Validation/Validator/element
element: function( element ) {
/// <summary>
@ -470,7 +470,7 @@ $.extend($.validator, {
? this.settings.showErrors.call( this, this.errorMap, this.errorList )
: this.defaultShowErrors();
},
// http://docs.jquery.com/Plugins/Validation/Validator/resetForm
resetForm: function() {
/// <summary>
@ -486,7 +486,7 @@ $.extend($.validator, {
this.hideErrors();
this.elements().removeClass( this.settings.errorClass );
},
numberOfInvalids: function() {
/// <summary>
/// Returns the number of invalid fields.
@ -499,26 +499,26 @@ $.extend($.validator, {
return this.objectLength(this.invalid);
},
objectLength: function( obj ) {
var count = 0;
for ( var i in obj )
count++;
return count;
},
hideErrors: function() {
this.addWrapper( this.toHide ).hide();
},
valid: function() {
return this.size() == 0;
},
size: function() {
return this.errorList.length;
},
focusInvalid: function() {
if( this.settings.focusInvalid ) {
try {
@ -532,18 +532,18 @@ $.extend($.validator, {
}
}
},
findLastActive: function() {
var lastActive = this.lastActive;
return lastActive && $.grep(this.errorList, function(n) {
return n.element.name == lastActive.name;
}).length == 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
// select all valid inputs inside the form (no submit or reset buttons)
// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
return $([]).add(this.currentForm.elements)
@ -552,24 +552,24 @@ $.extend($.validator, {
.not( this.settings.ignore )
.filter(function() {
!this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
// select only the first element for each name, and only those with rules specified
if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
return false;
rulesCache[this.name] = true;
return true;
});
},
clean: function( selector ) {
return $( selector )[0];
},
errors: function() {
return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
},
reset: function() {
this.successList = [];
this.errorList = [];
@ -578,32 +578,32 @@ $.extend($.validator, {
this.toHide = $([]);
this.currentElements = $([]);
},
prepareForm: function() {
this.reset();
this.toHide = this.errors().add( this.containers );
},
prepareElement: function( element ) {
this.reset();
this.toHide = this.errorsFor(element);
},
check: function( element ) {
element = this.clean( element );
// if radio/checkbox, validate first element in group instead
if (this.checkable(element)) {
element = this.findByName(element.name).not(this.settings.ignore)[0];
}
var rules = $(element).rules();
var dependencyMismatch = false;
for (var method in rules) {
var rule = { method: method, parameters: rules[method] };
try {
var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
// if a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result == "dependency-mismatch" ) {
@ -611,12 +611,12 @@ $.extend($.validator, {
continue;
}
dependencyMismatch = false;
if ( result == "pending" ) {
this.toHide = this.toHide.not( this.errorsFor(element) );
return;
}
if( !result ) {
this.formatAndAdd( element, rule );
return false;
@ -633,20 +633,20 @@ $.extend($.validator, {
this.successList.push(element);
return true;
},
// return the custom message for the given element and validation method
// specified in the element's "messages" metadata
customMetaMessage: function(element, method) {
if (!$.metadata)
return;
var meta = this.settings.meta
? $(element).metadata()[this.settings.meta]
: $(element).metadata();
return meta && meta.messages && meta.messages[method];
},
// return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[name];
@ -654,7 +654,7 @@ $.extend($.validator, {
? m
: m[method]);
},
// return the first defined argument, allowing empty strings
findDefined: function() {
for(var i = 0; i < arguments.length; i++) {
@ -663,7 +663,7 @@ $.extend($.validator, {
}
return undefined;
},
defaultMessage: function( element, method) {
return this.findDefined(
this.customMessage( element.name, method ),
@ -674,7 +674,7 @@ $.extend($.validator, {
"<strong>Warning: No message defined for " + element.name + "</strong>"
);
},
formatAndAdd: function( element, rule ) {
var message = this.defaultMessage( element, rule.method ),
theregex = /\$?\{(\d+)\}/g;
@ -682,22 +682,22 @@ $.extend($.validator, {
message = message.call(this, rule.parameters, element);
} else if (theregex.test(message)) {
message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);
}
}
this.errorList.push({
message: message,
element: element
});
this.errorMap[element.name] = message;
this.submitted[element.name] = message;
},
addWrapper: function(toToggle) {
if ( this.settings.wrapper )
toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
return toToggle;
},
defaultShowErrors: function() {
for ( var i = 0; this.errorList[i]; i++ ) {
var error = this.errorList[i];
@ -721,23 +721,23 @@ $.extend($.validator, {
this.hideErrors();
this.addWrapper( this.toShow ).show();
},
validElements: function() {
return this.currentElements.not(this.invalidElements());
},
invalidElements: function() {
return $(this.errorList).map(function() {
return this.element;
});
},
showLabel: function(element, message) {
var label = this.errorsFor( element );
if ( label.length ) {
// refresh error/success class
label.removeClass().addClass( this.settings.errorClass );
// check if we have a generated label, replace the message then
label.attr("generated") && label.html(message);
} else {
@ -764,14 +764,14 @@ $.extend($.validator, {
}
this.toShow = this.toShow.add(label);
},
errorsFor: function(element) {
var name = this.idOrName(element);
return this.errors().filter(function() {
return $(this).attr('for') == name;
});
},
idOrName: function(element) {
return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
},
@ -779,7 +779,7 @@ $.extend($.validator, {
checkable: function( element ) {
return /radio|checkbox/i.test(element.type);
},
findByName: function( name ) {
// select by name and filter by form for performance over form.find("[name=...]")
var form = this.currentForm;
@ -787,7 +787,7 @@ $.extend($.validator, {
return element.form == form && element.name == name && element || null;
});
},
getLength: function(value, element) {
switch( element.nodeName.toLowerCase() ) {
case 'select':
@ -798,13 +798,13 @@ $.extend($.validator, {
}
return value.length;
},
depend: function(param, element) {
return this.dependTypes[typeof param]
? this.dependTypes[typeof param](param, element)
: true;
},
dependTypes: {
"boolean": function(param, element) {
return param;
@ -816,18 +816,18 @@ $.extend($.validator, {
return param(element);
}
},
optional: function(element) {
return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
},
startRequest: function(element) {
if (!this.pending[element.name]) {
this.pendingRequest++;
this.pending[element.name] = true;
}
},
stopRequest: function(element, valid) {
this.pendingRequest--;
// sometimes synchronization fails, make sure pendingRequest is never < 0
@ -842,7 +842,7 @@ $.extend($.validator, {
this.formSubmitted = false;
}
},
previousValue: function(element) {
return $.data(element, "previousValue") || $.data(element, "previousValue", {
old: null,
@ -850,9 +850,9 @@ $.extend($.validator, {
message: this.defaultMessage( element, "remote" )
});
}
},
classRuleSettings: {
required: {required: true},
email: {email: true},
@ -865,7 +865,7 @@ $.extend($.validator, {
digits: {digits: true},
creditcard: {creditcard: true}
},
addClassRules: function(className, rules) {
/// <summary>
/// Add a compound class method - useful to refactor common combinations of rules into a single
@ -882,7 +882,7 @@ $.extend($.validator, {
this.classRuleSettings[className] = rules :
$.extend(this.classRuleSettings, className);
},
classRules: function(element) {
var rules = {};
var classes = $(element).attr('class');
@ -893,7 +893,7 @@ $.extend($.validator, {
});
return rules;
},
attributeRules: function(element) {
var rules = {};
var $element = $(element);
@ -904,24 +904,24 @@ $.extend($.validator, {
rules[method] = value;
}
}
// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
delete rules.maxlength;
}
return rules;
},
metadataRules: function(element) {
if (!$.metadata) return {};
var meta = $.data(element.form, 'validator').settings.meta;
return meta ?
$(element).metadata()[meta] :
$(element).metadata();
},
staticRules: function(element) {
var rules = {};
var validator = $.data(element.form, 'validator');
@ -930,7 +930,7 @@ $.extend($.validator, {
}
return rules;
},
normalizeRules: function(rules, element) {
// handle dependency check
$.each(rules, function(prop, val) {
@ -956,12 +956,12 @@ $.extend($.validator, {
}
}
});
// evaluate parameters
$.each(rules, function(rule, parameter) {
rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
});
// clean number parameters
$.each(['minlength', 'maxlength', 'min', 'max'], function() {
if (rules[this]) {
@ -973,7 +973,7 @@ $.extend($.validator, {
rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
}
});
if ($.validator.autoCreateRanges) {
// auto-create ranges
if (rules.min && rules.max) {
@ -987,15 +987,15 @@ $.extend($.validator, {
delete rules.maxlength;
}
}
// To support custom messages in metadata ignore rule methods titled "messages"
if (rules.messages) {
delete rules.messages;
}
return rules;
},
// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
normalizeRule: function(data) {
if( typeof data == "string" ) {
@ -1007,11 +1007,11 @@ $.extend($.validator, {
}
return data;
},
// http://docs.jquery.com/Plugins/Validation/Validator/addMethod
addMethod: function(name, method, message) {
/// <summary>
/// Add a custom validation method. It must consist of a name (must be a legal javascript
/// Add a custom validation method. It must consist of a name (must be a legal javascript
/// identifier), a javascript based function and a default string message.
/// </summary>
/// <param name="name" type="String">
@ -1022,8 +1022,8 @@ $.extend($.validator, {
/// The actual method implementation, returning true if an element is valid
/// </param>
/// <param name="message" type="String" optional="true">
/// (Optional) The default message to display for this method. Can be a function created by
/// jQuery.validator.format(value). When undefined, an already existing message is used
/// (Optional) The default message to display for this method. Can be a function created by
/// jQuery.validator.format(value). When undefined, an already existing message is used
/// (handy for localization), otherwise the field-specific messages have to be defined.
/// </param>
@ -1053,20 +1053,20 @@ $.extend($.validator, {
return $.trim(value).length > 0;
}
},
// http://docs.jquery.com/Plugins/Validation/Methods/remote
remote: function(value, element, param) {
if ( this.optional(element) )
return "dependency-mismatch";
var previous = this.previousValue(element);
if (!this.settings.messages[element.name] )
this.settings.messages[element.name] = {};
previous.originalMessage = this.settings.messages[element.name].remote;
this.settings.messages[element.name].remote = previous.message;
param = typeof param == "string" && {url:param} || param;
param = typeof param == "string" && {url:param} || param;
if ( this.pending[element.name] ) {
return "pending";
}
@ -1111,65 +1111,65 @@ $.extend($.validator, {
minlength: function(value, element, param) {
return this.optional(element) || this.getLength($.trim(value), element) >= param;
},
// http://docs.jquery.com/Plugins/Validation/Methods/maxlength
maxlength: function(value, element, param) {
return this.optional(element) || this.getLength($.trim(value), element) <= param;
},
// http://docs.jquery.com/Plugins/Validation/Methods/rangelength
rangelength: function(value, element, param) {
var length = this.getLength($.trim(value), element);
return this.optional(element) || ( length >= param[0] && length <= param[1] );
},
// http://docs.jquery.com/Plugins/Validation/Methods/min
min: function( value, element, param ) {
return this.optional(element) || value >= param;
},
// http://docs.jquery.com/Plugins/Validation/Methods/max
max: function( value, element, param ) {
return this.optional(element) || value <= param;
},
// http://docs.jquery.com/Plugins/Validation/Methods/range
range: function( value, element, param ) {
return this.optional(element) || ( value >= param[0] && value <= param[1] );
},
// http://docs.jquery.com/Plugins/Validation/Methods/email
email: function(value, element) {
// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
},
// http://docs.jquery.com/Plugins/Validation/Methods/url
url: function(value, element) {
// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
},
// http://docs.jquery.com/Plugins/Validation/Methods/date
date: function(value, element) {
return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
},
// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
dateISO: function(value, element) {
return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
},
// http://docs.jquery.com/Plugins/Validation/Methods/number
number: function(value, element) {
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
},
// http://docs.jquery.com/Plugins/Validation/Methods/digits
digits: function(value, element) {
return this.optional(element) || /^\d+$/.test(value);
},
// http://docs.jquery.com/Plugins/Validation/Methods/creditcard
// based on http://en.wikipedia.org/wiki/Luhn
creditcard: function(value, element) {
@ -1197,13 +1197,13 @@ $.extend($.validator, {
return (nCheck % 10) == 0;
},
// http://docs.jquery.com/Plugins/Validation/Methods/accept
accept: function(value, element, param) {
param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
},
// http://docs.jquery.com/Plugins/Validation/Methods/equalTo
equalTo: function(value, element, param) {
// bind to the blur event of the target in order to revalidate whenever the target field is updated
@ -1213,9 +1213,9 @@ $.extend($.validator, {
});
return value == target.val();
}
}
});
// deprecated, use $.validator.format instead
@ -1225,7 +1225,7 @@ $.format = $.validator.format;
// ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
;(function($) {
var pendingRequests = {};
// Use a prefilter if available (1.5+)
@ -1260,14 +1260,14 @@ $.format = $.validator.format;
// IE has native support, in other browsers, use event caputuring (neither bubbles)
// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
;(function($) {
// only implement if not provided by jQuery core (since 1.4)
// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
$.each({
focus: 'focusin',
blur: 'focusout'
blur: 'focusout'
}, function( original, fix ){
$.event.special[fix] = {
setup:function() {

View File

@ -122,7 +122,7 @@ $.extend($.fn, {
return valid;
}
},
// attributes: space seperated list of attributes to retrieve and remove
// attributes: space separated list of attributes to retrieve and remove
removeAttrs: function( attributes ) {
var result = {},
$element = this;

View File

@ -6,12 +6,12 @@ using System;
namespace Microsoft.AspNetCore.Mvc.ModelBinding
{
/// <summary>
/// An error that occured during model binding and validation.
/// An error that occurred during model binding and validation.
/// </summary>
public class ModelError
{
/// <summary>
/// Intiializes a new instance of <see cref="ModelError"/> with the specified <paramref name="exception"/>.
/// Initializes a new instance of <see cref="ModelError"/> with the specified <paramref name="exception"/>.
/// </summary>
/// <param name="exception">The <see cref="System.Exception"/>.</param>
public ModelError(Exception exception)
@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
}
/// <summary>
/// Intiializes a new instance of <see cref="ModelError"/> with the specified <paramref name="exception"/>
/// Initializes a new instance of <see cref="ModelError"/> with the specified <paramref name="exception"/>
/// and specified <paramref name="errorMessage"/>.
/// </summary>
/// <param name="exception">The <see cref="System.Exception"/>.</param>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist 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
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@ -511,7 +511,7 @@
<value>Unexcepted end when reading JSON.</value>
</data>
<data name="ApiConventions_Title_500" xml:space="preserve">
<value>An error occured while processing your request.</value>
<value>An error occurred while processing your request.</value>
</data>
<data name="FailedToReadRequestForm" xml:space="preserve">
<value>Failed to read the request form. {0}</value>

View File

@ -2416,7 +2416,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test
var problemDetails = Assert.IsType<ProblemDetails>(badRequestResult.Value);
Assert.Equal(500, actionResult.StatusCode);
Assert.Equal(500, problemDetails.Status);
Assert.Equal("An error occured while processing your request.", problemDetails.Title);
Assert.Equal("An error occurred while processing your request.", problemDetails.Title);
Assert.Equal("https://tools.ietf.org/html/rfc7231#section-6.6.1", problemDetails.Type);
Assert.Equal("some-trace", problemDetails.Extensions["traceId"]);
}
@ -2488,7 +2488,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test
},
[500] = new ClientErrorData
{
Title = "An error occured while processing your request.",
Title = "An error occurred while processing your request.",
Link = "https://tools.ietf.org/html/rfc7231#section-6.6.1"
}
}

View File

@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
// Assert
Assert.Equal(500, problemDetails.Status);
Assert.Equal("An error occured while processing your request.", problemDetails.Title);
Assert.Equal("An error occurred while processing your request.", problemDetails.Title);
Assert.Equal("https://tools.ietf.org/html/rfc7231#section-6.6.1", problemDetails.Type);
Assert.Null(problemDetails.Instance);
Assert.Null(problemDetails.Detail);

View File

@ -101,7 +101,7 @@ export class LoginComponent implements OnInit {
private getReturnUrl(state?: INavigationState): string {
const fromQuery = (this.activatedRoute.snapshot.queryParams as INavigationState).returnUrl;
// If the url is comming from the query string, check that is either
// If the url is coming from the query string, check that is either
// a relative url or an absolute url
if (fromQuery &&
!(fromQuery.startsWith(`${window.location.origin}/`) ||

View File

@ -95,7 +95,7 @@ export class LogoutComponent implements OnInit {
private getReturnUrl(state?: INavigationState): string {
const fromQuery = (this.activatedRoute.snapshot.queryParams as INavigationState).returnUrl;
// If the url is comming from the query string, check that is either
// If the url is coming from the query string, check that is either
// a relative url or an absolute url
if (fromQuery &&
!(fromQuery.startsWith(`${window.location.origin}/`) ||

View File

@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
: base(context, scheme, options, properties: null) { }
/// <summary>
/// The exception that occured while processing the authentication.
/// The exception that occurred while processing the authentication.
/// </summary>
public Exception Exception { get; set; }
}

View File

@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
errorCode = SecurityStatusPalErrorCode.UnknownCredentials;
}
error = new Exception($"An authentication exception occured (0x{majorStatus:X}/0x{minorStatus:X}).", error);
error = new Exception($"An authentication exception occurred (0x{majorStatus:X}/0x{minorStatus:X}).", error);
}
if (errorCode == SecurityStatusPalErrorCode.OK

View File

@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
{
eventInvoked++;
Assert.IsType<Exception>(context.Exception);
Assert.Equal("A test other error occured", context.Exception.Message);
Assert.Equal("A test other error occurred", context.Exception.Message);
return Task.CompletedTask;
}
};
@ -140,7 +140,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
var ex = await Assert.ThrowsAsync<Exception>(() =>
SendAsync(server, "/404", new TestConnection(), "Negotiate OtherError"));
Assert.Equal("A test other error occured", ex.Message);
Assert.Equal("A test other error occurred", ex.Message);
Assert.Equal(1, eventInvoked);
}
@ -182,7 +182,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
{
eventInvoked++;
Assert.IsType<Exception>(context.Exception);
Assert.Equal("A test credential error occured", context.Exception.Message);
Assert.Equal("A test credential error occurred", context.Exception.Message);
return Task.CompletedTask;
}
};
@ -232,7 +232,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
{
eventInvoked++;
Assert.IsType<Exception>(context.Exception);
Assert.Equal("A test client error occured", context.Exception.Message);
Assert.Equal("A test client error occurred", context.Exception.Message);
return Task.CompletedTask;
}
};
@ -555,15 +555,15 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
return "ServerKerberosBlob2";
case "CredentialError":
errorType = BlobErrorType.CredentialError;
ex = new Exception("A test credential error occured");
ex = new Exception("A test credential error occurred");
return null;
case "ClientError":
errorType = BlobErrorType.ClientError;
ex = new Exception("A test client error occured");
ex = new Exception("A test client error occurred");
return null;
case "OtherError":
errorType = BlobErrorType.Other;
ex = new Exception("A test other error occured");
ex = new Exception("A test other error occurred");
return null;
default:
errorType = BlobErrorType.Other;

View File

@ -301,7 +301,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
var testConnection = new TestConnection();
var ex = await Assert.ThrowsAsync<Exception>(() => SendAsync(server, "/404", testConnection, "Negotiate OtherError"));
Assert.Equal("A test other error occured", ex.Message);
Assert.Equal("A test other error occurred", ex.Message);
}
// Single Stage
@ -552,15 +552,15 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
return "ServerKerberosBlob2";
case "CredentialError":
errorType = BlobErrorType.CredentialError;
ex = new Exception("A test credential error occured");
ex = new Exception("A test credential error occurred");
return null;
case "ClientError":
errorType = BlobErrorType.ClientError;
ex = new Exception("A test client error occured");
ex = new Exception("A test client error occurred");
return null;
case "OtherError":
errorType = BlobErrorType.Other;
ex = new Exception("A test other error occured");
ex = new Exception("A test other error occurred");
return null;
default:
errorType = BlobErrorType.Other;

View File

@ -148,7 +148,7 @@ namespace OpenIdConnect.AzureAdSample
}
catch (Exception ex)
{
await response.WriteAsync($"AquireToken error: {ex.Message}");
await response.WriteAsync($"AcquireToken error: {ex.Message}");
}
});
}

View File

@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
new CertificateAuthenticationOptions
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedValidWithClientEku);
@ -63,7 +63,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
new CertificateAuthenticationOptions
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedValidWithNoEku);
@ -92,7 +92,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
new CertificateAuthenticationOptions
{
AllowedCertificateTypes = CertificateTypes.Chained,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedValidWithNoEku);
@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
new CertificateAuthenticationOptions
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedValidWithServerEku);
@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
ValidateCertificateUse = false,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedValidWithServerEku);
@ -139,7 +139,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
{
AllowedCertificateTypes = CertificateTypes.Chained,
ValidateCertificateUse = false,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedValidWithServerEku);
@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
ValidateCertificateUse = false,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedExpired);
@ -171,7 +171,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
ValidateValidityPeriod = false,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedExpired);
@ -187,7 +187,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
ValidateCertificateUse = false,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedNotYetValid);
@ -203,7 +203,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
ValidateValidityPeriod = false,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
Certificates.SelfSignedNotYetValid);
@ -248,7 +248,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
var server = CreateServer(
new CertificateAuthenticationOptions
{
Events = sucessfulValidationEvents
Events = successfulValidationEvents
});
var response = await server.CreateClient().GetAsync("https://example.com/");
@ -262,9 +262,9 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
new CertificateAuthenticationOptions
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
wireUpHeaderMiddleware : true);
wireUpHeaderMiddleware: true);
var client = server.CreateClient();
client.DefaultRequestHeaders.Add("X-Client-Cert", Convert.ToBase64String(Certificates.SelfSignedValidWithNoEku.RawData));
@ -278,7 +278,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
var server = CreateServer(
new CertificateAuthenticationOptions
{
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
wireUpHeaderMiddleware: true);
@ -295,7 +295,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
new CertificateAuthenticationOptions
{
AllowedCertificateTypes = CertificateTypes.SelfSigned,
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
wireUpHeaderMiddleware: true,
headerName: "X-ARR-ClientCert");
@ -312,7 +312,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
var server = CreateServer(
new CertificateAuthenticationOptions
{
Events = sucessfulValidationEvents
Events = successfulValidationEvents
},
wireUpHeaderMiddleware: true,
headerName: "X-ARR-ClientCert");
@ -564,7 +564,7 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test
return server;
}
private CertificateAuthenticationEvents sucessfulValidationEvents = new CertificateAuthenticationEvents()
private CertificateAuthenticationEvents successfulValidationEvents = new CertificateAuthenticationEvents()
{
OnCertificateValidated = context =>
{

View File

@ -148,6 +148,6 @@
<value>The given IAsyncResult does not match this opperation.</value>
</data>
<data name="Warning_ExceptionInOnResponseCompletedAction" xml:space="preserve">
<value>An exception occured while running an action registered with {0}.</value>
<value>An exception occurred while running an action registered with {0}.</value>
</data>
</root>

View File

@ -266,7 +266,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
[ConditionalFact]
[MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Requires HTTP/2 Trailers support.")]
public async Task ResponseTrailers_MultipleValues_SentAsSeperateHeaders()
public async Task ResponseTrailers_MultipleValues_SentAsSeparateHeaders()
{
using (Utilities.CreateDynamicHttpsServer(out var address, httpContext =>
{
@ -278,7 +278,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
response.EnsureSuccessStatusCode();
Assert.Equal(HttpVersion.Version20, response.Version);
Assert.NotEmpty(response.TrailingHeaders);
// We can't actually assert they are sent as seperate headers using HttpClient, we'd have to write a lower level test
// We can't actually assert they are sent as separate headers using HttpClient, we'd have to write a lower level test
// that read the header frames directly.
Assert.Equal(new[] { "TrailerValue0", "TrailerValue1" }, response.TrailingHeaders.GetValues("TrailerName"));
}

View File

@ -9,7 +9,7 @@ class ConfigurationLoadException: public std::runtime_error
{
public:
ConfigurationLoadException(std::wstring msg)
: runtime_error("Configuration load exception has occured"), message(std::move(msg))
: runtime_error("Configuration load exception has occurred"), message(std::move(msg))
{
}

View File

@ -406,7 +406,7 @@ HASH_TABLE<_Record,_Key>::InsertRecord(
)
/*++
This method inserts a node for this record and also empty nodes for paths
in the heirarchy leading upto this path
in the hierarchy leading upto this path
The insert is done under only a read-lock - this is possible by keeping
the hashes in a bucket in increasing order and using interlocked operations

View File

@ -82,7 +82,7 @@ private:
);
//
// Pointer to the begining of the inlined array.
// Pointer to the beginning of the inlined array.
//
PVOID m_pVariables;
SIZE_T m_Alignment;
@ -104,7 +104,7 @@ PER_CPU<T>::Create(
DWORD ObjectCacheLineSize = 0;
DWORD NumberOfProcessors = 0;
PER_CPU<T> * pInstance = NULL;
hr = GetProcessorInformation(&CacheLineSize,
&NumberOfProcessors);
if (FAILED(hr))
@ -143,7 +143,7 @@ PER_CPU<T>::Create(
// The array start in the 2nd cache line.
//
pInstance->m_pVariables = reinterpret_cast<PBYTE>(pInstance) + CacheLineSize;
//
// Pass a disposer for disposing initialized items in case of failure.
//

View File

@ -1637,7 +1637,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1684,7 +1684,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1733,7 +1733,7 @@ Arguments:
Return Value:
The index for the last character occurence in the string.
The index for the last character occurrence in the string.
-1 if not found.

View File

@ -1065,7 +1065,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1112,7 +1112,7 @@ Arguments:
Return Value:
The index for the first character occurence in the string.
The index for the first character occurrence in the string.
-1 if not found.
@ -1161,7 +1161,7 @@ Arguments:
Return Value:
The index for the last character occurence in the string.
The index for the last character occurrence in the string.
-1 if not found.

View File

@ -417,7 +417,7 @@ TREE_HASH_TABLE<_Record>::AddNodeInternal(
TREE_HASH_NODE<_Record> ** ppNewNode
)
/*++
Return value is HRESULT indicating sucess or failure
Return value is HRESULT indicating success or failure
pszPath, dwHash, pRecord - path, hash value and record to be inserted
pParentNode - this will be the parent of the node being inserted
ppNewNode - on successful return, the new node created and inserted
@ -519,7 +519,7 @@ TREE_HASH_TABLE<_Record>::InsertRecord(
)
/*++
This method inserts a node for this record and also empty nodes for paths
in the heirarchy leading upto this path
in the hierarchy leading upto this path
The insert is done under only a read-lock - this is possible by keeping
the hashes in a bucket in increasing order and using interlocked operations

View File

@ -195,7 +195,7 @@ IN_PROCESS_APPLICATION::ExecuteApplication()
auto context = std::make_shared<ExecuteClrContext>();
ErrorContext errorContext; // unused
ErrorContext errorContext; // unused
if (s_fMainCallback == nullptr)
{
@ -247,15 +247,15 @@ IN_PROCESS_APPLICATION::ExecuteApplication()
auto startupReturnCode = context->m_hostFxr.InitializeForApp(context->m_argc, context->m_argv.get(), m_dotnetExeKnownLocation);
if (startupReturnCode != 0)
{
throw InvalidOperationException(format(L"Error occured when initializing inprocess application, Return code: 0x%x", startupReturnCode));
throw InvalidOperationException(format(L"Error occurred when initializing in-process application, Return code: 0x%x", startupReturnCode));
}
if (m_pConfig->QueryCallStartupHook())
{
PWSTR startupHookValue = NULL;
// Will get property not found if the enviroment variable isn't set.
// Will get property not found if the environment variable isn't set.
context->m_hostFxr.GetRuntimePropertyValue(DOTNETCORE_STARTUP_HOOK, &startupHookValue);
if (startupHookValue == NULL)
{
RETURN_IF_NOT_ZERO(context->m_hostFxr.SetRuntimePropertyValue(DOTNETCORE_STARTUP_HOOK, ASPNETCORE_STARTUP_ASSEMBLY));

View File

@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
for (shift = total; shift >= 0; shift -= 4)
{
// Using Unsafe.Add to elide the bounds check on _hex as the & 0x0f definately
// Using Unsafe.Add to elide the bounds check on _hex as the & 0x0f definitely
// constrains it to the range 0x0 - 0xf, matching the bounds of the array
span[offset] = Unsafe.Add(ref startHex, ((dataCount >> shift) & 0x0f));
offset++;
@ -56,7 +56,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
// bytes for the chunked prefix, so we would have to copy once we call advance. Therefore, to avoid this scenario,
// we slice the memory by one byte.
// See https://gist.github.com/halter73/af2b9f78978f83813b19e187c4e5309e if you would like to tweek the algorithm at all.
// See https://gist.github.com/halter73/af2b9f78978f83813b19e187c4e5309e if you would like to tweak the algorithm at all.
if (length <= 65544)
{

View File

@ -241,7 +241,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
TakeSingleHeader(pHeader, length, handler);
}
// Read the header sucessfully, skip the reader forward past the header line.
// Read the header successfully, skip the reader forward past the header line.
reader.Advance(length);
span = span.Slice(length);
}

View File

@ -197,7 +197,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2
var result = await Input.ReadAsync();
var buffer = result.Buffer;
// Call UpdateCompletedStreams() prior to frame processing in order to remove any streams that have exceded their drain timeouts.
// Call UpdateCompletedStreams() prior to frame processing in order to remove any streams that have exceeded their drain timeouts.
UpdateCompletedStreams();
try
@ -921,7 +921,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2
if (_clientActiveStreamCount > _serverSettings.MaxConcurrentStreams)
{
// The protocol default stream limit is infinite so the client can excede our limit at the start of the connection.
// The protocol default stream limit is infinite so the client can exceed our limit at the start of the connection.
// Refused streams can be retried, by which time the client must have received our settings frame with our limit information.
throw new Http2StreamErrorException(_currentHeadersStream.StreamId, CoreStrings.Http2ErrorMaxStreams, Http2ErrorCode.REFUSED_STREAM);
}

View File

@ -124,7 +124,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
}
catch (Exception ex)
{
Logger.LogError(ex, "An error occured running an IConnectionCompleteFeature.OnCompleted callback.");
Logger.LogError(ex, "An error occurred running an IConnectionCompleteFeature.OnCompleted callback.");
}
}
@ -139,7 +139,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
}
catch (Exception ex)
{
Logger.LogError(ex, "An error occured running an IConnectionCompleteFeature.OnCompleted callback.");
Logger.LogError(ex, "An error occurred running an IConnectionCompleteFeature.OnCompleted callback.");
}
while (onCompleted.TryPop(out var entry))
@ -150,7 +150,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
}
catch (Exception ex)
{
Logger.LogError(ex, "An error occured running an IConnectionCompleteFeature.OnCompleted callback.");
Logger.LogError(ex, "An error occurred running an IConnectionCompleteFeature.OnCompleted callback.");
}
}
}

View File

@ -114,7 +114,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
Assert.Equal(stateObject, callbackState);
var errors = logger.Messages.Where(e => e.LogLevel >= LogLevel.Error).ToArray();
Assert.Single(errors);
Assert.Equal("An error occured running an IConnectionCompleteFeature.OnCompleted callback.", errors[0].Message);
Assert.Equal("An error occurred running an IConnectionCompleteFeature.OnCompleted callback.", errors[0].Message);
}
private class ThrowingListener : IConnectionListener

View File

@ -201,7 +201,7 @@ namespace Interop.FunctionalTests
private class BulkContent : HttpContent
{
private static readonly byte[] Content;
private static readonly int Repititions = 200;
private static readonly int Repetitions = 200;
static BulkContent()
{
@ -214,7 +214,7 @@ namespace Interop.FunctionalTests
protected override async Task SerializeToStreamAsync(Stream stream, TransportContext context)
{
for (var i = 0; i < Repititions; i++)
for (var i = 0; i < Repetitions; i++)
{
using (var timer = new CancellationTokenSource(TimeSpan.FromSeconds(30)))
{
@ -244,7 +244,7 @@ namespace Interop.FunctionalTests
while (read > 0)
{
totalRead += read;
Assert.True(totalRead <= Repititions * Content.Length, "Too Long");
Assert.True(totalRead <= Repetitions * Content.Length, "Too Long");
for (var offset = 0; offset < read; offset++)
{
@ -256,7 +256,7 @@ namespace Interop.FunctionalTests
read = await stream.ReadAsync(buffer, 0, buffer.Length, timer.Token).DefaultTimeout();
}
Assert.True(totalRead == Repititions * Content.Length, "Too Short");
Assert.True(totalRead == Repetitions * Content.Length, "Too Short");
}
}
@ -1064,7 +1064,7 @@ namespace Interop.FunctionalTests
{
request.Headers.Add("header" + i, oneKbString + i);
}
request.Headers.Host = "localhost"; // The default Host header has a random port value wich can cause the length to vary.
request.Headers.Host = "localhost"; // The default Host header has a random port value which can cause the length to vary.
var requestTask = client.SendAsync(request);
var response = await requestTask.DefaultTimeout();
await serverResult.Task.DefaultTimeout();
@ -1128,7 +1128,7 @@ namespace Interop.FunctionalTests
[Theory]
// Expect this to change when the client implements dynamic request header compression.
// Will the client send the first headers before receiving our settings frame?
// We'll probobly need to ensure the settings changes are ack'd before enforcing them.
// We'll probably need to ensure the settings changes are ack'd before enforcing them.
[MemberData(nameof(SupportedSchemes))]
public async Task Settings_HeaderTableSize_CanBeReduced_Server(string scheme)
{
@ -1186,7 +1186,7 @@ namespace Interop.FunctionalTests
}
// Settings_HeaderTableSize_CanBeReduced_Client - The client uses the default 4k HPACK dynamic table size and it cannot be changed.
// Nor does Kestrel yet support sending dynaimc table updates, so there's nothing to test here. https://github.com/dotnet/aspnetcore/issues/4715
// Nor does Kestrel yet support sending dynamic table updates, so there's nothing to test here. https://github.com/dotnet/aspnetcore/issues/4715
[Theory]
[MemberData(nameof(SupportedSchemes))]
@ -1243,7 +1243,7 @@ namespace Interop.FunctionalTests
// SKIP: https://github.com/dotnet/aspnetcore/issues/17842
// The client initially issues all 10 requests before receiving the settings, has 5 refused (after receiving the settings),
// waits for the first 5 to finish, retries the refused 5, and in the end each request completes sucesfully despite the logged errors.
// waits for the first 5 to finish, retries the refused 5, and in the end each request completes successfully despite the logged errors.
// Assert.Empty(TestSink.Writes.Where(context => context.Message.Contains("HTTP/2 stream error")));
await host.StopAsync().DefaultTimeout();
@ -1304,7 +1304,7 @@ namespace Interop.FunctionalTests
// SKIP: https://github.com/dotnet/aspnetcore/issues/17842
// The client initially issues all 10 requests before receiving the settings, has 5 refused (after receiving the settings),
// waits for the first 5 to finish, retries the refused 5, and in the end each request completes sucesfully despite the logged errors.
// waits for the first 5 to finish, retries the refused 5, and in the end each request completes successfully despite the logged errors.
// Assert.Empty(TestSink.Writes.Where(context => context.Message.Contains("HTTP/2 stream error")));
await host.StopAsync().DefaultTimeout();
@ -1356,7 +1356,7 @@ namespace Interop.FunctionalTests
{
ConfigureKestrel(webHostBuilder, scheme);
webHostBuilder.ConfigureServices(AddTestLogging)
.Configure(app => app.Run(context => throw new NotImplementedException() ));
.Configure(app => app.Run(context => throw new NotImplementedException()));
});
using var host = await hostBuilder.StartAsync().DefaultTimeout();

View File

@ -102,11 +102,11 @@ namespace Microsoft.AspNetCore.DiagnosticsViewPage.Views
private string AttributeEnding { get; set; }
protected void BeginWriteAttribute(string name, string begining, int startPosition, string ending, int endPosition, int thingy)
protected void BeginWriteAttribute(string name, string beginning, int startPosition, string ending, int endPosition, int thingy)
{
Debug.Assert(string.IsNullOrEmpty(AttributeEnding));
Output.Write(begining);
Output.Write(beginning);
AttributeEnding = ending;
}

View File

@ -64,7 +64,7 @@ namespace Microsoft.Extensions.RazorViews
/// <param name="stream">The stream to write to</param>
public async Task ExecuteAsync(Stream stream)
{
// We technically don't need this intermediate buffer if this method accepts a memory stream.
// We technically don't need this intermediate buffer if this method accepts a memory stream.
var buffer = new MemoryStream();
Output = new StreamWriter(buffer, UTF8NoBOM, 4096, leaveOpen: true);
await ExecuteAsync();
@ -149,11 +149,11 @@ namespace Microsoft.Extensions.RazorViews
private string AttributeEnding { get; set; }
protected void BeginWriteAttribute(string name, string begining, int startPosition, string ending, int endPosition, int thingy)
protected void BeginWriteAttribute(string name, string beginning, int startPosition, string ending, int endPosition, int thingy)
{
Debug.Assert(string.IsNullOrEmpty(AttributeEnding));
Output.Write(begining);
Output.Write(beginning);
AttributeEnding = ending;
}

View File

@ -132,13 +132,13 @@ namespace Microsoft.AspNetCore.SignalR.Internal
var genericMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType);
var methodParameters = genericMethodInfo.GetParameters();
var methodArguements = new Expression[]
var methodArguments = new Expression[]
{
Expression.Convert(parameters[0], methodParameters[0].ParameterType),
parameters[1],
};
var methodCall = Expression.Call(null, genericMethodInfo, methodArguements);
var methodCall = Expression.Call(null, genericMethodInfo, methodArguments);
var lambda = Expression.Lambda<Func<object, CancellationToken, IAsyncEnumerable<object>>>(methodCall, parameters);
return lambda.Compile();
}

View File

@ -667,7 +667,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
return new AsyncEnumerableImpl<string>(CounterAsyncEnumerable(count));
}
public AsyncEnumerableImplChannelThrows<string> AsyncEnumerableIsPreferedOverChannelReader(int count)
public AsyncEnumerableImplChannelThrows<string> AsyncEnumerableIsPreferredOverChannelReader(int count)
{
return new AsyncEnumerableImplChannelThrows<string>(CounterChannel(count));
}

View File

@ -2136,7 +2136,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
nameof(StreamingHub.CounterAsyncEnumerable),
nameof(StreamingHub.CounterAsyncEnumerableAsync),
nameof(StreamingHub.CounterAsyncEnumerableImpl),
nameof(StreamingHub.AsyncEnumerableIsPreferedOverChannelReader),
nameof(StreamingHub.AsyncEnumerableIsPreferredOverChannelReader),
};
foreach (var method in methods)

View File

@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis
internal async Task<IConnectionMultiplexer> ConnectAsync(TextWriter log)
{
// Factory is publically settable. Assigning to a local variable before null check for thread safety.
// Factory is publicly settable. Assigning to a local variable before null check for thread safety.
var factory = ConnectionFactory;
if (factory == null)
{