Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in comments #174

Merged
merged 1 commit into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static class FormatterExtensions

internal static string GetClosestClientMediaType(this IEnumerable<TextOutputFormatter> outputFormatters, ResourceFormat resourceFormat, IEnumerable<string> acceptHeaders)
{
// When overriding the MediaType with the querystring parameter
// When overriding the MediaType with the query string parameter
// some browsers don't display the response when returning "application/fhir+xml".
// For this reason we try to match a media type from the OutputFormatter with the request Accept header.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class UrlResolver : IUrlResolver
/// </summary>
/// <param name="urlHelperFactory">The ASP.NET Core URL helper factory.</param>
/// <param name="httpContextAccessor">The ASP.NET Core HTTP context accessor.</param>
/// <param name="actionContextAccessor">The ASP.NET Core Action context accesor.</param>
/// <param name="actionContextAccessor">The ASP.NET Core Action context accessor.</param>
public UrlResolver(IUrlHelperFactory urlHelperFactory, IHttpContextAccessor httpContextAccessor, IActionContextAccessor actionContextAccessor)
{
EnsureArg.IsNotNull(urlHelperFactory, nameof(urlHelperFactory));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override async Task<AuthorizationPolicy> GetPolicyAsync(string policyName
{
policy = new AuthorizationPolicyBuilder().AddRequirements(new ResourceActionRequirement(policyName)).Build();

// This caches the the policy in the base class
// This caches the policy in the base class
_options.AddPolicy(policyName, policy);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.Health.Fhir.Api.Features.Security
{
public static class PolicyNames
{
public const string FhirPolicy = "Fhir Policy";
public const string FhirPolicy = "FHIR Policy";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think this change makes sense? @garamamo @brandonpollett


public const string ReadPolicy = "Read";

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Health.Fhir.Api/Modules/SearchModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void Load(IServiceCollection services)
// TODO: Remove the following once bug 65143 is fixed.
// All of the classes that implement IProvideCapability will be automatically be picked up and registered.
// This means that even though ResourceTypeManifestManager is not being registered, the service will still
// try to instantiate but will fail since the dependency components are not regsitered. We should re-look
// try to instantiate but will fail since the dependency components are not registered. We should re-look
// at the logic for automatically registering types since different component could have different life time.
// For now, just manually remove the registration.
RemoveRegistration(typeof(IProvideCapability), typeof(SearchParameterDefinitionManager), ServiceLifetime.Transient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void GivenATargetResourceTypeThatIsNotSupported_WhenParsing_ThenException
string param1 = "ref";
string param2 = "param";

// Practitioner is a valid resource type but is not supported by the search paramter.
// Practitioner is a valid resource type but is not supported by the search parameter.
string key = $"{param1}:Practitioner.{param2}";

SetupReferenceSearchParameter(sourceResourceType, param1, targetResourceType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ public void GivenAnInvalidParameter_WhenInitializing_ThenExceptionShouldBeThrown
public static IEnumerable<object[]> GetParameterOutOfRangeData()
{
yield return new object[] { ParamNameYear, 0, 1, 1, 1, 1, 1, 0m, 60 }; // Year cannot be less than 1.
yield return new object[] { ParamNameYear, 10000, 1, 1, 1, 1, 1, 0m, 60 }; // Year cannot be greather than 9999.
yield return new object[] { ParamNameYear, 10000, 1, 1, 1, 1, 1, 0m, 60 }; // Year cannot be greater than 9999.
yield return new object[] { ParamNameMonth, 2017, 0, 1, 1, 1, 1, 0m, 60 }; // Month cannot be less than 1.
yield return new object[] { ParamNameMonth, 2017, 13, 1, 1, 1, 1, 0m, 60 }; // Month cannot be greater than 12.
yield return new object[] { ParamNameDay, 2017, 1, 0, 1, 1, 1, 0m, 60 }; // Day cannot be less than 1.
yield return new object[] { ParamNameDay, 2017, 1, 32, 1, 1, 1, 0m, 60 }; // Day cannot be greather 31 in January.
yield return new object[] { ParamNameDay, 2017, 1, 32, 1, 1, 1, 0m, 60 }; // Day cannot be greater 31 in January.
yield return new object[] { ParamNameDay, 2001, 2, 29, 1, 1, 1, 0m, 60 }; // Day cannot be greater than 28 in non-leap year.
yield return new object[] { ParamNameDay, 2000, 2, 30, 1, 1, 1, 0m, 60 }; // Day cannot be greater than 29 in leap year.
yield return new object[] { ParamNameHour, 2017, 1, 1, -1, 1, 1, 0m, 60 }; // Hour cannot be less than 0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public async Task GivenAFhirRepository_WhenSavingAResourceWithoutETagAndETagIsRe
{
var resource = Samples.GetDefaultPatient();

// Documented for completeness, but under this situation debatably this request should succeed.
// Documented for completeness, but under this situation arguably this request should succeed.
// Versioned-update + UpdateCreate; When no If-Match header is provided, the request should allow create but not update
await Assert.ThrowsAsync<PreconditionFailedException>(async () => await _repository.UpsertAsync(resource, null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static IEnumerable<IEnumerable<TSource>> CartesianProduct<TSource>(this I
/// <summary>
/// Generates a sequence that contains one value.
/// </summary>
/// <typeparam name="TResult">The elementtype.</typeparam>
/// <typeparam name="TResult">The element type.</typeparam>
/// <param name="element">The element to return.</param>
/// <returns>An <see cref="IEnumerable{T}"/> that contains one value.</returns>
public static IEnumerable<TResult> AsEnumerable<TResult>(this TResult element)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static StringExpression NotStartsWith(FieldName fieldName, int? component
}

/// <summary>
/// Creates a <see cref="MultiaryExpression"/> that represents logical OR opeation over <paramref name="expressions"/>.
/// Creates a <see cref="MultiaryExpression"/> that represents logical OR operation over <paramref name="expressions"/>.
/// </summary>
/// <param name="expressions">The expressions.</param>
/// <returns>A <see cref="MultiaryExpression"/> that has <see cref="MultiaryOperator"/> of OR on all <paramref name="expressions"/>.</returns>
Expand All @@ -187,7 +187,7 @@ public static MultiaryExpression Or(params Expression[] expressions)
}

/// <summary>
/// Creates a <see cref="MultiaryExpression"/> that represents logical OR opeation over <paramref name="expressions"/>.
/// Creates a <see cref="MultiaryExpression"/> that represents logical OR operation over <paramref name="expressions"/>.
/// </summary>
/// <param name="expressions">The expressions.</param>
/// <returns>A <see cref="MultiaryExpression"/> that has <see cref="MultiaryOperator"/> of OR on all <paramref name="expressions"/>.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.Health.Fhir.Core.Features.Search.Expressions
/// <summary>
/// Represents search field name.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "Respresents a search parameter types for FHIR")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "Represents a search parameter types for FHIR")]
public enum FieldName
{
DateTimeStart,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public Expression Build(

void ISearchValueVisitor.Visit(CompositeSearchValue composite)
{
// Composite search values will be break down into individual component
// Composite search values will be broken down into individual components,
// and therefore this method should not be called.
throw new InvalidOperationException("The composite search value should have been breaked down into components and have handled individually.");
throw new InvalidOperationException("The composite search value should have been broken down into components and handled individually.");
}

void ISearchValueVisitor.Visit(DateTimeSearchValue dateTime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface ISearchService
/// <param name="resourceType">The resource type that should be searched.</param>
/// <param name="queryParameters">The search queries.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A <see cref="Bundle"/> representing the earch result.</returns>
/// <returns>A <see cref="Bundle"/> representing the result.</returns>
Task<Bundle> SearchAsync(
string resourceType,
IReadOnlyList<Tuple<string, string>> queryParameters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public SearchIndexEntry(string paramName, ISearchValue value)
}

/// <summary>
/// Gets the prameter name.
/// Gets the parameter name.
/// </summary>
public string ParamName { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public StringSearchValue(string s)
/// <summary>
/// Gets the string value.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "Respresents a FHIR search parameter of type string")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "Represents a FHIR search parameter of type string")]
public string String { get; }

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static string EscapeSearchParameterValue(this string s)
return s;
}

// Escaping character has to be escaped first since the rest of the escaping uses escaping charater.
// Escaping character has to be escaped first since the rest of the escaping uses escaping character.
s = s.Replace($"{EscapingCharacter}", EscapedEscapingCharacter, StringComparison.Ordinal);
s = s.Replace($"{TokenSeparator}", EscapedTokenSeparator, StringComparison.Ordinal);
s = s.Replace($"{CompositeSeparator}", EscapedCompositeSeparator, StringComparison.Ordinal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public IEnumerable<string> Validate(string html)
/// Cleanses the provided HTML to return only Elements and Attributes allowed by the FHIR specification
/// </summary>
/// <param name="html">The raw HTML</param>
/// <returns>Sanatized HTML for display purposes</returns>
/// <returns>Sanitized HTML for display purposes</returns>
public string Sanitize(string html)
{
EnsureArg.IsNotNullOrEmpty(html, nameof(html));
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Health.Fhir.Core/FhirExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Microsoft.Health.Fhir.Core
{
/// <summary>
/// Provides extension methods to Fhir objects.
/// Provides extension methods to FHIR objects.
/// </summary>
public static class FhirExtensions
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Health.Fhir.Core/Models/PartialDateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public PartialDateTime(

if (utcOffset == null)
{
// If hour and minut are specified, then the timezone offset must be specified
// If hour and minute are specified, then the timezone offset must be specified
// per spec (http://hl7.org/fhir/datatypes.html#dateTime).
// However, in search queries, the time zone information is optional (http://hl7.org/fhir/search.html#date).
// The parsing logic will default to UTC time zone if the time zone information is not specified in the search query.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void Visit(BinaryExpression expression)

public void Visit(ChainedExpression expression)
{
// TODO: This will be removed once it's impelmented.
// TODO: This will be removed once it's implemented.
throw new SearchOperationNotSupportedException("ChainedExpression is not supported.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
namespace Microsoft.Health.Fhir.CosmosDb.Features.Storage.Continuation
{
/// <summary>
/// Defines a contract for caching and retrieving CosmosDb continuation tokens
/// Defines a contract for caching and retrieving Cosmos DB continuation tokens
/// </summary>
/// <remarks>
/// The larger a cosmosdb collection grows, the bigger the Continuation Token gets.
/// The larger a Cosmos DB collection grows, the bigger the Continuation Token gets.
/// At a certain point, an encoded continuation token will exceed the accepted size of a URL (2048 chars),
/// this breaks the Bundle.next link and results in an error (e.g. HTTP 414)
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class CosmosQueryContext : ICosmosQueryContext
/// <summary>
/// Initializes a new instance of the <see cref="CosmosQueryContext"/> class.
/// </summary>
/// <param name="collectionUri">The colleciton URI.</param>
/// <param name="collectionUri">The collection URI.</param>
/// <param name="sqlQuerySpec">The SQL query.</param>
/// <param name="feedOptions">The options.</param>
public CosmosQueryContext(Uri collectionUri, SqlQuerySpec sqlQuerySpec, FeedOptions feedOptions = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public interface ICosmosDocumentQueryLogger
/// Logs the query execution result.
/// </summary>
/// <param name="queryId">The query id for correlating query execution.</param>
/// <param name="activityId">The activity id retured by the Cosmos DB.</param>
/// <param name="activityId">The activity id returned by the Cosmos DB.</param>
/// <param name="requestCharge">The request charge for the execution.</param>
/// <param name="continuationToken">The continuation token for paging.</param>
/// <param name="eTag">The ETag for the result.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Microsoft.Health.Fhir.CosmosDb.Features.Storage
{
/// <summary>
/// Provides methods for creating a DocumentClient instance and initializating a collection.
/// Provides methods for creating a DocumentClient instance and initializing a collection.
/// </summary>
public interface IDocumentClientInitializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function upsertWithHistory(doc, matchVersionId, allowCreate, keepHistory) {
let selfLink = document._self;

if (keepHistory) {
// Convert the currect primary record to a 'history' record
// Convert the current primary record to a 'history' record
let historyDocument = convertToHistoryRecord(document);

// Insert the history object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task SetupCollectionAsync(IDocumentClient documentClient, DocumentC
{
using (var distributedLock = _lockFactory.Create(documentClient, _configuration.RelativeCollectionUri, $"UpgradeLock:{CollectionSettingsVersion}"))
{
_logger.LogDebug("Attempting to aquire upgrade lock");
_logger.LogDebug("Attempting to acquire upgrade lock");

await distributedLock.AcquireLock(cancellationTokenSource.Token);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static IApplicationBuilder UseDevelopmentIdentityProvider(this IApplicati

/// <summary>
/// If <paramref name="testEnvironmentFilePath"/> exists, adds an <see cref="IConfigurationBuilder"/> that
/// reads a testauthenvironment.json file and reshapes it to fit into the expected schema of the fhir server
/// reads a testauthenvironment.json file and reshapes it to fit into the expected schema of the FHIR server
/// configuration. Also sets the security audience and sets the development identity server as enabled.
/// This is an optional configuration source and is only intended to be used for local development.
/// </summary>
Expand Down
Loading