Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@
<IdentityServer4StoragePackageVersion>4.1.0</IdentityServer4StoragePackageVersion>
<IdentityServer4EntityFrameworkStoragePackageVersion>4.1.0</IdentityServer4EntityFrameworkStoragePackageVersion>
<MessagePackPackageVersion>2.1.90</MessagePackPackageVersion>
<MicrosoftIdentityWebPackageVersion>0.4.0-preview</MicrosoftIdentityWebPackageVersion>
<MicrosoftIdentityWebMicrosoftGraphPackageVersion>0.4.0-preview</MicrosoftIdentityWebMicrosoftGraphPackageVersion>
<MicrosoftIdentityWebUIPackageVersion>0.4.0-preview</MicrosoftIdentityWebUIPackageVersion>
<MicrosoftIdentityWebPackageVersion>1.0.0</MicrosoftIdentityWebPackageVersion>
<MicrosoftIdentityWebMicrosoftGraphPackageVersion>1.0.0</MicrosoftIdentityWebMicrosoftGraphPackageVersion>
<MicrosoftIdentityWebUIPackageVersion>1.0.0</MicrosoftIdentityWebUIPackageVersion>
<MessagePackAnalyzerPackageVersion>$(MessagePackPackageVersion)</MessagePackAnalyzerPackageVersion>
<MoqPackageVersion>4.10.0</MoqPackageVersion>
<MonoCecilPackageVersion>0.11.2</MonoCecilPackageVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<NoPackageAnalysis>true</NoPackageAnalysis>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<Description>Roslyn analyzers for ASP.NET Core Components.</Description>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Components/Authorization/src/AuthorizeRouteView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ private static readonly RenderFragment _defaultAuthorizingContent
private readonly RenderFragment<AuthenticationState> _renderNotAuthorizedDelegate;
private readonly RenderFragment _renderAuthorizingDelegate;

/// <summary>
/// Initialize a new instance of a <see cref="AuthorizeRouteView"/>.
/// </summary>
public AuthorizeRouteView()
{
// Cache the rendering delegates so that we only construct new closure instances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<Description>Authentication and authorization support for Blazor applications.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Components/Components/src/RouteView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class RouteView : IComponent
[Parameter]
public Type DefaultLayout { get; set; }

/// <summary>
/// Initializes a new instance of <see cref="RouteView"/>.
/// </summary>
public RouteView()
{
// Cache the delegate instances
Expand Down
6 changes: 6 additions & 0 deletions src/Components/Components/src/Routing/NavigationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ internal NavigationContext(string path, CancellationToken cancellationToken)
CancellationToken = cancellationToken;
}

/// <summary>
/// The target path for the navigation.
/// </summary>
public string Path { get; }

/// <summary>
/// The <see cref="CancellationToken"/> to use to cancel navigation.
/// </summary>
public CancellationToken CancellationToken { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Description>Forms and validation support for Blazor applications.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>CS0436;$(NoWarn)</NoWarn>
<NoWarn>CS0436;$(NoWarn.Replace('1591', ''))</NoWarn>
<DefineConstants>$(DefineConstants);ENABLE_UNSAFE_MSGPACK;SPAN_BUILTIN;MESSAGEPACK_INTERNAL;COMPONENTS_SERVER</DefineConstants>
<IsPackable>false</IsPackable>
<EmbeddedFilesManifestFileName>Microsoft.Extensions.FileProviders.Embedded.Manifest.xml</EmbeddedFilesManifestFileName>
Expand Down
3 changes: 3 additions & 0 deletions src/Components/Web/src/ElementReferenceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

namespace Microsoft.AspNetCore.Components
{
/// <summary>
/// Static class that adds extension methods to <see cref="ElementReference"/>.
/// </summary>
public static class ElementReferenceExtensions
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Components/Web/src/Forms/InputBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ private bool ConvertToDictionary(IReadOnlyDictionary<string, object>? source, ou
return newDictionaryCreated;
}

/// <inheritdoc/>
protected virtual void Dispose(bool disposing)
{
}
Expand Down
3 changes: 3 additions & 0 deletions src/Components/Web/src/Forms/InputFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ public class InputFile : ComponentBase, IInputFileJsCallbacks, IDisposable
[Parameter(CaptureUnmatchedValues = true)]
public IDictionary<string, object>? AdditionalAttributes { get; set; }

/// <inheritdoc/>
protected override void OnInitialized()
{
_jsUnmarshalledRuntime = JSRuntime as IJSUnmarshalledRuntime;
}

/// <inheritdoc/>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
Expand All @@ -55,6 +57,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
}
}

/// <inheritdoc/>
protected override void BuildRenderTree(RenderTreeBuilder builder)
{
builder.OpenElement(0, "input");
Expand Down
4 changes: 4 additions & 0 deletions src/Components/Web/src/Forms/ValidationMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ protected override void BuildRenderTree(RenderTreeBuilder builder)
}
}

/// <summary>
/// Called to dispose this instance.
/// </summary>
/// <param name="disposing"><see langword="true"/> if called within <see cref="IDisposable.Dispose"/>.</param>
protected virtual void Dispose(bool disposing)
{
}
Expand Down
1 change: 1 addition & 0 deletions src/Components/Web/src/Forms/ValidationSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ protected override void BuildRenderTree(RenderTreeBuilder builder)
}
}

/// <inheritdoc/>
protected virtual void Dispose(bool disposing)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>Microsoft.AspNetCore.Components</RootNamespace>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Components/Web/src/Routing/NavLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ private bool EqualsHrefExactlyOrIfTrailingSlashAdded(string currentUriAbsolute)
return false;
}

/// <inheritdoc/>
protected override void BuildRenderTree(RenderTreeBuilder builder)
{
builder.OpenElement(0, "a");
Expand Down
7 changes: 7 additions & 0 deletions src/Components/Web/src/WebElementReferenceContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@

namespace Microsoft.AspNetCore.Components
{
/// <summary>
/// A <see cref="ElementReferenceContext"/> for a web element.
/// </summary>
public class WebElementReferenceContext : ElementReferenceContext
{
internal IJSRuntime JSRuntime { get; }

/// <summary>
/// Initialize a new instance of <see cref="WebElementReferenceContext"/>.
/// </summary>
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
public WebElementReferenceContext(IJSRuntime jsRuntime)
{
JSRuntime = jsRuntime ?? throw new ArgumentNullException(nameof(jsRuntime));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<Description>Authenticate your Blazor webassembly applications with Azure Active Directory and Azure Active Directory B2C</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<StartupObject>Microsoft.AspNetCore.Components.WebAssembly.DevServer.Program</StartupObject>
<Description>Development server for use when building Blazor applications.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
<!-- Set this to false because assemblies should not reference this assembly directly, (except for tests, of course). -->
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<PackageTags>wasm;javascript;interop</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsShippingPackage>true</IsShippingPackage>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ protected override void BeginInvokeJS(long asyncHandle, string identifier, strin
InternalCalls.InvokeJS<object, object, object, string>(out _, ref callInfo, null, null, null);
}

/// <inheritdoc />
protected override void EndInvokeDotNet(DotNetInvocationInfo callInfo, in DotNetInvocationResult dispatchResult)
{
// For failures, the common case is to call EndInvokeDotNet with the Exception object.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>MSBuild support for building Blazor WebAssembly apps.</Description>
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net46</TargetFrameworks>
Expand All @@ -9,7 +9,7 @@
<SdkOutputPath>$(ArtifactsBinDir)Microsoft.NET.Sdk.BlazorWebAssembly\$(Configuration)\sdk-output\</SdkOutputPath>

<!-- Allow assemblies outside of lib in the package -->
<NoWarn>$(NoWarn);NU5100</NoWarn>
<NoWarn>$(NoWarn.Replace('1591', ''));NU5100</NoWarn>
<!-- Need to build this project in source build -->
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<IsShippingPackage>true</IsShippingPackage>

<!-- We're deliberately bundling assemblies as content files. Suppress the warning. -->
<NoWarn>$(NoWarn);NU5100</NoWarn>
<NoWarn>$(NoWarn.Replace('1591', ''));NU5100</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Expand Down
13 changes: 13 additions & 0 deletions src/Components/WebAssembly/Server/src/TargetPickerUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace Microsoft.AspNetCore.Components.WebAssembly.Server
{
/// <summary>
/// Class for the target picker ui.
/// </summary>
public class TargetPickerUi
{
private static readonly JsonSerializerOptions JsonOptions = new JsonSerializerOptions
Expand All @@ -26,12 +29,22 @@ public class TargetPickerUi
private string _browserHost;
private string _debugProxyUrl;

/// <summary>
/// Initialize a new instance of <see cref="TargetPickerUi"/>.
/// </summary>
/// <param name="debugProxyUrl">The debug proxy url.</param>
/// <param name="devToolsHost">The dev tools host.</param>
public TargetPickerUi(string debugProxyUrl, string devToolsHost)
{
_debugProxyUrl = debugProxyUrl;
_browserHost = devToolsHost;
}

/// <summary>
/// Display the ui.
/// </summary>
/// <param name="context">The <see cref="HttpContext"/>.</param>
/// <returns>The <see cref="Task"/>.</returns>
public async Task Display(HttpContext context)
{
context.Response.ContentType = "text/html";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public interface IRemoteAuthenticationBuilder<TRemoteAuthenticationState, TAccou
where TRemoteAuthenticationState : RemoteAuthenticationState
where TAccount : RemoteUserAccount
{
/// <summary>
/// The <see cref="IServiceCollection"/>.
/// </summary>
IServiceCollection Services { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Description>Build client-side authentication for single-page applications (SPAs).</Description>
<IsShippingPackage>true</IsShippingPackage>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public class AccountClaimsPrincipalFactory<TAccount> where TAccount : RemoteUser
private readonly IAccessTokenProviderAccessor _accessor;

#pragma warning disable PUB0001 // Pubternal type in public API
/// <summary>
/// Initialize a new instance of <see cref="AccountClaimsPrincipalFactory{TAccount}"/>.
/// </summary>
/// <param name="accessor"></param>
public AccountClaimsPrincipalFactory(IAccessTokenProviderAccessor accessor) => _accessor = accessor;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ public class AccessTokenNotAvailableException : Exception
private readonly NavigationManager _navigation;
private readonly AccessTokenResult _tokenResult;

/// <summary>
/// Initialize a new instance of <see cref="AccessTokenNotAvailableException"/>.
/// </summary>
/// <param name="navigation">The <see cref="NavigationManager"/>.</param>
/// <param name="tokenResult">The <see cref="AccessTokenResult"/>.</param>
/// <param name="scopes">The scopes.</param>
public AccessTokenNotAvailableException(
NavigationManager navigation,
AccessTokenResult tokenResult,
Expand All @@ -28,6 +34,9 @@ public AccessTokenNotAvailableException(
_navigation = navigation;
}

/// <summary>
/// Navigates to <see cref="AccessTokenResult.RedirectUrl"/> to allow refreshing the access token.
/// </summary>
public void Redirect() => _navigation.NavigateTo(_tokenResult.RedirectUrl);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public class SignOutSessionStateManager
PropertyNameCaseInsensitive = true,
};

/// <summary>
/// Initialize a new instance of <see cref="SignOutSessionStateManager"/>.
/// </summary>
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
public SignOutSessionStateManager(IJSRuntime jsRuntime) => _jsRuntime = jsRuntime;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Microsoft.AspNetCore.Components.WebAssembly.Hosting
{
/// <summary>
/// Static class that adds extension methods to <see cref="IWebAssemblyHostEnvironment"/>.
/// </summary>
public static class WebAssemblyHostEnvironmentExtensions
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<Description>Build client-side single-page applications (SPAs) with Blazor running under WebAssembly.</Description>
<IsShippingPackage>true</IsShippingPackage>
<NoWarn>$(NoWarn);BL0006</NoWarn>
<NoWarn>$(NoWarn.Replace('1591', ''));BL0006</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public sealed class LazyAssemblyLoader
private readonly IJSRuntime _jsRuntime;
private readonly HashSet<string> _loadedAssemblyCache;

/// <summary>
/// Initializes a new instance of <see cref="LazyAssemblyLoader"/>.
/// </summary>
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
public LazyAssemblyLoader(IJSRuntime jsRuntime)
{
_jsRuntime = jsRuntime;
Expand Down
12 changes: 11 additions & 1 deletion src/Middleware/Diagnostics.Abstractions/src/DiagnosticMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ namespace Microsoft.AspNetCore.Diagnostics
/// </summary>
public class DiagnosticMessage
{
/// <summary>
/// Initializes a new instance of <see cref="DiagnosticMessage"/>.
/// </summary>
/// <param name="message">The error message.</param>
/// <param name="formattedMessage">The formatted error message.</param>
/// <param name="filePath">The path of the file that produced the message.</param>
/// <param name="startLine">The one-based line index for the start of the compilation error.</param>
/// <param name="startColumn">The zero-based column index for the start of the compilation error.</param>
/// <param name="endLine">The one-based line index for the end of the compilation error.</param>
/// <param name="endColumn">The zero-based column index for the end of the compilation error.</param>
public DiagnosticMessage(
string message,
string formattedMessage,
Expand Down Expand Up @@ -61,4 +71,4 @@ public DiagnosticMessage(
/// </summary>
public string FormattedMessage { get; }
}
}
}
Loading