Skip to content

Commit

Permalink
Add XML comments (#2120)
Browse files Browse the repository at this point in the history
* Add GenerateDocumentationFile to Blazorise core project

* Fixed invalid comments

* Move GenerateDocumentationFile zo Blazorise.csproj

* Remove duplicate usings

* Add GenerateDocumentationFile to all public projects

* Fix invalid comments
  • Loading branch information
stsrki committed Mar 29, 2021
1 parent 0479583 commit 07a6ee4
Show file tree
Hide file tree
Showing 41 changed files with 97 additions and 51 deletions.
4 changes: 2 additions & 2 deletions Build/Blazorise.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<Copyright>Copyright 2018-2020 Mladen Macanovic</Copyright>
<RepositoryUrl>https://github.com/stsrki/Blazorise</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<TargetFramework>net5.0</TargetFramework>
<OutputType>Library</OutputType>
<IsPackable>true</IsPackable>
<IsPackable>true</IsPackable>
<LangVersion>9.0</LangVersion>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Base/BaseInputComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected async Task CurrentValueHandler( string value )
}

/// <summary>
/// Parses a string value and convert it to a <see cref="TValue"/>.
/// Parses a string value and convert it to a <see cref="BaseInputComponent{TValue}"/>.
/// </summary>
/// <param name="value">A string value to convert.</param>
/// <returns>Returns the result of parse operation.</returns>
Expand Down
5 changes: 5 additions & 0 deletions Source/Blazorise/Blazorise.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE.md" Pack="true" Visible="false" PackagePath="" />
<None Include="..\..\NuGet\Blazorise.png" Pack="true" Visible="false" PackagePath="" />
Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Components/Button/CloseButton.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected bool IsAutoClose
[CascadingParameter] protected Alert ParentAlert { get; set; }

/// <summary>
/// Cascaded <see cref="Modal/> component in which this <see cref="CloseButton"/> is placed.
/// Cascaded <see cref="Modal"/> component in which this <see cref="CloseButton"/> is placed.
/// </summary>
[CascadingParameter] protected Modal ParentModal { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Components/DateEdit/DateEdit.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Blazorise
/// <summary>
/// An editor that displays a date value and allows a user to edit the value.
/// </summary>
/// <typeparam name="TValue">Data-type to be binded by the <see cref="Value"/> property.</typeparam>
/// <typeparam name="TValue">Data-type to be binded by the <see cref="DateEdit{TValue}"/> property.</typeparam>
public partial class DateEdit<TValue> : BaseTextInput<TValue>
{
#region Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ protected Task ClickHandler()
/// </summary>
/// <param name="elementId">Id of an element.</param>
/// <param name="closeReason">Close reason.</param>
/// <param name="isChildClicked">Indicates if the child element was clicked.</param>
/// <returns>True if it's safe to be closed.</returns>
public Task<bool> IsSafeToClose( string elementId, CloseReason closeReason, bool isChildClicked )
{
Expand Down
3 changes: 1 addition & 2 deletions Source/Blazorise/Components/FileEdit/FileEdit.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,8 @@ public bool Multiple
}

/// <summary>
/// Specifies the types of files that the input accepts.
/// Specifies the types of files that the input accepts. https://www.w3schools.com/tags/att_input_accept.asp"
/// </summary>
/// <see cref="https://www.w3schools.com/tags/att_input_accept.asp"/>
[Parameter] public string Filter { get; set; }

/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions Source/Blazorise/Components/NumericEdit/NumericEdit.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ protected CultureInfo CurrentCultureInfo
[Parameter] public TValue Max { get; set; }

/// <summary>
/// The size attribute specifies the visible width, in characters, of an <input> element.
/// The size attribute specifies the visible width, in characters, of an input element. https://www.w3schools.com/tags/att_input_size.asp
/// </summary>
/// <see cref="https://www.w3schools.com/tags/att_input_size.asp"/>
[Parameter] public int? VisibleCharacters { get; set; }

#endregion
Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Components/Table/TableRow.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public TextColor TextColor
}

/// <summary>
/// Sets a table row as selected by appending "selected" modifier on a <tr>.
/// Sets a table row as selected by appending "selected" modifier on a tr element.
/// </summary>
[Parameter]
public bool Selected
Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Components/Tabs/TabsContent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ internal void NotifyTabPanelRemoved( string name )
/// <summary>
/// Sets the active panel by the name.
/// </summary>
/// <param name="tabName">The name of the panel.</param>
/// <param name="name">The name of the panel.</param>
public void SelectPanel( string name )
{
SelectedPanel = name;
Expand Down
3 changes: 1 addition & 2 deletions Source/Blazorise/Components/TextEdit/TextEdit.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ protected override Task<ParseValue<string>> ParseValueFromStringAsync( string va
[Parameter] public int? MaxLength { get; set; }

/// <summary>
/// The size attribute specifies the visible width, in characters, of an <input> element.
/// The size attribute specifies the visible width, in characters, of an input element. https://www.w3schools.com/tags/att_input_size.asp".
/// </summary>
/// <see cref="https://www.w3schools.com/tags/att_input_size.asp"/>
[Parameter] public int? VisibleCharacters { get; set; }

#endregion
Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Components/TimeEdit/TimeEdit.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Blazorise
/// <summary>
/// An editor that displays a time value and allows a user to edit the value.
/// </summary>
/// <typeparam name="TValue">Data-type to be binded by the <see cref="Value"/> property.</typeparam>
/// <typeparam name="TValue">Data-type to be binded by the <see cref="TimeEdit{TValue}"/> property.</typeparam>
public partial class TimeEdit<TValue> : BaseTextInput<TValue>
{
#region Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface IEditContextValidator
/// <param name="editContext">Edit context</param>
/// <param name="messages">Holds the list of error messages if any error is found.</param>
/// <param name="fieldIdentifier">Identifies the field for validation.</param>
/// <param name="forLocalization">If true, error messages will be returned as raw messages that needs to be manually localized.</param>
/// <param name="messageLocalizer">Handler for message localizer..</param>
void ValidateField( EditContext editContext, ValidationMessageStore messages, in FieldIdentifier fieldIdentifier, Func<string, IEnumerable<string>, string> messageLocalizer );
}

Expand Down
6 changes: 3 additions & 3 deletions Source/Blazorise/Enums/DisplayType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ public enum DisplayType
InlineFlex,

/// <summary>
/// Let the element behave like a <table> element.
/// Let the element behave like a table element.
/// </summary>
Table,

/// <summary>
/// Let the element behave like a <tr> element.
/// Let the element behave like a tr element.
/// </summary>
TableRow,

/// <summary>
/// Let the element behave like a <td> element.
/// Let the element behave like a td element.
/// </summary>
TableCell,
}
Expand Down
12 changes: 6 additions & 6 deletions Source/Blazorise/Fluent/FluentDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,17 @@ public IFluentDisplayWithDisplayOnBreakpointWithDirection WithDirection( Display
public IFluentDisplayWithDisplayOnBreakpointWithDirection InlineBlock { get { return WithDisplay( DisplayType.InlineBlock ); } }

/// <summary>
/// Let the element behave like a <table> element.
/// Let the element behave like a table element.
/// </summary>
public IFluentDisplayWithDisplayOnBreakpointWithDirection Table { get { return WithDisplay( DisplayType.Table ); } }

/// <summary>
/// Let the element behave like a <tr> element.
/// Let the element behave like a tr element.
/// </summary>
public IFluentDisplayWithDisplayOnBreakpointWithDirection TableRow { get { return WithDisplay( DisplayType.TableRow ); } }

/// <summary>
/// Let the element behave like a <td> element.
/// Let the element behave like a td element.
/// </summary>
public IFluentDisplayWithDisplayOnBreakpointWithDirection TableCell { get { return WithDisplay( DisplayType.TableCell ); } }

Expand Down Expand Up @@ -325,17 +325,17 @@ public static class Display
public static IFluentDisplayWithDisplayOnBreakpointWithDirection InlineBlock { get { return new FluentDisplay().InlineBlock; } }

/// <summary>
/// Let the element behave like a <table> element.
/// Let the element behave like a table element.
/// </summary>
public static IFluentDisplayWithDisplayOnBreakpointWithDirection Table { get { return new FluentDisplay().Table; } }

/// <summary>
/// Let the element behave like a <tr> element.
/// Let the element behave like a tr element.
/// </summary>
public static IFluentDisplayWithDisplayOnBreakpointWithDirection TableRow { get { return new FluentDisplay().TableRow; } }

/// <summary>
/// Let the element behave like a <td> element.
/// Let the element behave like a td element.
/// </summary>
public static IFluentDisplayWithDisplayOnBreakpointWithDirection TableCell { get { return new FluentDisplay().TableCell; } }

Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Interfaces/IBreakpointActivator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface IBreakpointActivator
/// <summary>
/// Triggers the component to activate breakpoint
/// </summary>
/// <param name="closeReason">The reason for closing the component.</param>
/// <param name="broken">The reason for closing the component.</param>
Task OnBreakpoint( bool broken );
}
}
1 change: 1 addition & 0 deletions Source/Blazorise/Interfaces/ICloseActivator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public interface ICloseActivator
/// </summary>
/// <param name="elementId">Currently clicked element id.</param>
/// <param name="closeReason">The reason for closing the component.</param>
/// <param name="isChild">Determines if the clicked element is a child.</param>
/// <returns>Returns true if the closable component is ready to be closed.</returns>
Task<bool> IsSafeToClose( string elementId, CloseReason closeReason, bool isChild );

Expand Down
5 changes: 0 additions & 5 deletions Source/Blazorise/Interfaces/IJSRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ public interface IJSRunner

ValueTask<bool> Focus( ElementReference elementRef, string elementId, bool scrollToElement );

/// <summary>
/// Handles the closing of the components that can be toggled.
/// </summary>
/// <param name="component">Toggle component.</param>
/// <returns></returns>
ValueTask<object> RegisterClosableComponent( DotNetObjectReference<CloseActivatorAdapter> dotNetObjectRef, ElementReference elementRef );

ValueTask<object> UnregisterClosableComponent( ICloseActivator component );
Expand Down
1 change: 1 addition & 0 deletions Source/Blazorise/Themes/ThemeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ protected virtual void GenerateBreakpointStyles( StringBuilder sb, Theme theme,
/// Generates styles that are based on the variant colors.
/// </summary>
/// <param name="sb">Target string builder.</param>
/// <param name="theme">Theme settings.</param>
/// <param name="variant">Variant name.</param>
/// <param name="color">Color value.</param>
protected virtual void GenerateColorStyles( StringBuilder sb, Theme theme, string variant, string color )
Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/Utilities/ClassBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ClassBuilder
/// <summary>
/// Default class builder constructor that accepts build action.
/// </summary>
/// <param name="buildStyles">Action responsible for building the classes.</param>
/// <param name="buildClasses">Action responsible for building the classes.</param>
public ClassBuilder( Action<ClassBuilder> buildClasses )
{
this.buildClasses = buildClasses;
Expand Down
5 changes: 5 additions & 0 deletions Source/Extensions/Blazorise.Animate/Blazorise.Animate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<Authors>$(Authors);Mikael Koskinen</Authors>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Blazorise\Blazorise.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<PackageTags>blazorise blazor components chart streaming</PackageTags>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Blazorise\Blazorise.csproj" />
<ProjectReference Include="..\Blazorise.Charts\Blazorise.Charts.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ChartStreamingOptions
public int Delay { get; set; } = 0;

/// <summary>
/// Frequency at which the chart is drawn on a display (frames per second). This option can be set at chart level but not at axis level. Decrease this value to save CPU power. <seealso cref="https://github.com/nagix/chartjs-plugin-streaming#lowering-cpu-usage"/>
/// Frequency at which the chart is drawn on a display (frames per second). This option can be set at chart level but not at axis level. Decrease this value to save CPU power (https://github.com/nagix/chartjs-plugin-streaming#lowering-cpu-usage).
/// </summary>
public int FrameRate { get; set; } = 30;
}
Expand Down
5 changes: 5 additions & 0 deletions Source/Extensions/Blazorise.Charts/Blazorise.Charts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<PackageTags>blazorise blazor components chart</PackageTags>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Blazorise\Blazorise.csproj" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Source/Extensions/Blazorise.Charts/ChartOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public class AxisScaleLabel
public string LabelString { get; set; } = "";

/// <summary>
/// Height of an individual line of text (<see cref="https://developer.mozilla.org/en-US/docs/Web/CSS/line-height"/>).
/// Height of an individual line of text (https://developer.mozilla.org/en-US/docs/Web/CSS/line-height).
/// </summary>
[DataMember]
public double LineHeight { get; set; } = 1.2d;
Expand Down Expand Up @@ -524,7 +524,7 @@ public class Animation
public int Duration { get; set; } = 1000;

/// <summary>
/// Easing function to use. <seealso cref="https://www.chartjs.org/docs/latest/configuration/animations.html#easing"/>
/// Easing function to use (https://www.chartjs.org/docs/latest/configuration/animations.html#easing).
/// </summary>
[DataMember]
public string Easing { get; set; } = "easeOutQuart";
Expand Down
10 changes: 5 additions & 5 deletions Source/Extensions/Blazorise.Components/Autocomplete.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected async Task OnTextChangedHandler( string text )
/// </summary>
/// <param name="eventArgs">Event arguments.</param>
/// <returns>Returns awaitable task</returns>
protected async Task OnTextKeyDownHandler( KeyboardEventArgs e )
protected async Task OnTextKeyDownHandler( KeyboardEventArgs eventArgs )
{
if ( !DropdownVisible )
return;
Expand All @@ -93,22 +93,22 @@ protected async Task OnTextKeyDownHandler( KeyboardEventArgs e )

var activeItemIndex = ActiveItemIndex;

if ( ( e.Code == "Enter" || e.Code == "NumpadEnter" || e.Code == "Tab" ) )
if ( eventArgs.Code == "Enter" || eventArgs.Code == "NumpadEnter" || eventArgs.Code == "Tab" )
{
var item = FilteredData.ElementAtOrDefault( activeItemIndex );

if ( item != null && ValueField != null )
await OnDropdownItemClicked( ValueField.Invoke( item ) );
}
else if ( e.Code == "Escape" )
else if ( eventArgs.Code == "Escape" )
{
await Clear();
}
else if ( e.Code == "ArrowUp" )
else if ( eventArgs.Code == "ArrowUp" )
{
UpdateActiveFilterIndex( --activeItemIndex );
}
else if ( e.Code == "ArrowDown" )
else if ( eventArgs.Code == "ArrowDown" )
{
UpdateActiveFilterIndex( ++activeItemIndex );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<PackageTags>blazorise blazor components</PackageTags>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Blazorise\Blazorise.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Extensions/Blazorise.Components/SelectList.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Blazorise.Components
/// Dynamically builds select component and it's items based in the supplied data.
/// </summary>
/// <typeparam name="TItem">Data item type.</typeparam>
/// <typeparam name="TValue">Type if the value inside of <see cref="TItem"/>.</typeparam>
/// <typeparam name="TValue">Type if the value inside of <see cref="SelectList{TItem, TValue}"/>.</typeparam>
public partial class SelectList<TItem, TValue> : ComponentBase
{
#region Members
Expand Down
4 changes: 2 additions & 2 deletions Source/Extensions/Blazorise.DataGrid/BaseDataGridColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class BaseDataGridColumn<TItem> : BaseDataGridComponent
/// <summary>
/// Gets the formated display value.
/// </summary>
/// <param name="item">Item the contains the value to format.</param>
/// <returns></returns>
/// <param name="value">Item the contains the value to format.</param>
/// <returns>Formated display value.</returns>
public string FormatDisplayValue( object value )
{
if ( DisplayFormat != null )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<PackageTags>blazorise blazor components datagrid</PackageTags>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Blazorise\Blazorise.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ internal void Hook( DataGridColumn<TItem> column )
/// <summary>
/// Links the child column with this datagrid.
/// </summary>
/// <param name="column">Column to link with this datagrid.</param>
/// <param name="aggregate">Aggregate column to link with this datagrid.</param>
internal void Hook( DataGridAggregate<TItem> aggregate )
{
Aggregates.Add( aggregate );
Expand Down
Loading

0 comments on commit 07a6ee4

Please sign in to comment.