Skip to content

Commit

Permalink
Upgrade package version.
Browse files Browse the repository at this point in the history
Add documentation.
  • Loading branch information
CXuesong committed Aug 12, 2018
1 parent b1e0abe commit b196d56
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
10 changes: 9 additions & 1 deletion WikiClientLibrary/Generators/AllPagesGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ namespace WikiClientLibrary.Generators
/// <summary>
/// Generates all the pages in a specific namespace.
/// </summary>
/// <remarks>
/// To enumerate all the categories used on a wiki site,
/// along with those without existing category pages, use <see cref="CategoriesGenerator"/>.
/// </remarks>
/// <seealso cref="RandomPageGenerator"/>
public class AllPagesGenerator : WikiPageGenerator
{

Expand All @@ -23,7 +28,10 @@ public AllPagesGenerator(WikiSite site) : base(site)
{
}

public int NamespaceId { get; set; } = 0;
/// <summary>
/// List all the pages in this namespace.
/// </summary>
public int NamespaceId { get; set; } = BuiltInNamespaces.Main;

/// <summary>
/// Start listing at this title. The title need not exist.
Expand Down
10 changes: 10 additions & 0 deletions WikiClientLibrary/Generators/RecentChangesGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,19 @@ public RecentChangesGenerator(WikiSite site) : base(site)
/// </summary>
public RecentChangesFilterTypes TypeFilters { get; set; } = RecentChangesFilterTypes.All;

/// <summary>
/// Whether to list minor edits.
/// </summary>
public PropertyFilterOption MinorFilter { get; set; }

/// <summary>
/// Whether to list bot edits.
/// </summary>
public PropertyFilterOption BotFilter { get; set; }

/// <summary>
/// Whether to list edits by anonymous users.
/// </summary>
public PropertyFilterOption AnonymousFilter { get; set; }

/// <summary>
Expand Down Expand Up @@ -158,6 +167,7 @@ public override IEnumerable<KeyValuePair<string, object>> EnumGeneratorParameter
// if a wiki page is modified more than once. And when a page title is shown for the
// 2nd, 3rd, etc time, only the properties that has been changed will be included in JSON,
// which will screw up Page.LoadFromJson .
/// <inheritdoc />
protected override bool DistinctGeneratedPages => true;

/// <inheritdoc />
Expand Down
15 changes: 15 additions & 0 deletions WikiClientLibrary/Generators/WikiPageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,33 @@ namespace WikiClientLibrary.Generators
public static class WikiPageExtensions
{

/// <summary>
/// Creates a <see cref="LinksGenerator"/> instance from the specified page,
/// which generates pages from all links on the page.
/// </summary>
/// <param name="page">The page.</param>
public static LinksGenerator CreateLinksGenerator(this WikiPage page)
{
if (page == null) throw new ArgumentNullException(nameof(page));
return new LinksGenerator(page.Site, page.Title);
}

/// <summary>
/// Creates a <see cref="TransclusionsGenerator"/> instance from the specified page,
/// which generates pages from all pages (typically templates) transcluded in the page.
/// </summary>
/// <param name="page">The page.</param>
public static TransclusionsGenerator CreateTransclusionsGenerator(this WikiPage page)
{
if (page == null) throw new ArgumentNullException(nameof(page));
return new TransclusionsGenerator(page.Site, page.Title);
}

/// <summary>
/// Creates a <see cref="RevisionsGenerator"/> instance from the specified page,
/// which enumerates the sequence of revisions on the page.
/// </summary>
/// <param name="page">The page.</param>
public static RevisionsGenerator CreateRevisionsGenerator(this WikiPage page)
{
if (page == null) throw new ArgumentNullException(nameof(page));
Expand Down
8 changes: 4 additions & 4 deletions WikiClientLibrary/WikiClientLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<TargetFrameworks>netstandard1.1;netstandard2.0</TargetFrameworks>
<AssemblyName>WikiClientLibrary</AssemblyName>
<PackageId>CXuesong.MW.WikiClientLibrary</PackageId>
<Version>0.6.0</Version>
<AssemblyVersion>0.6.0.18</AssemblyVersion>
<FileVersion>0.6.0.18</FileVersion>
<Version>0.6.1</Version>
<AssemblyVersion>0.6.1.0</AssemblyVersion>
<FileVersion>0.6.1.0</FileVersion>
<Copyright>Copyright (C) CXuesong 2018</Copyright>
<Description>
Wiki Client Library is a .NET Standard &amp; asynchronous client library for MediaWiki sites.
Expand All @@ -33,7 +33,7 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Authors>CXuesong</Authors>
<Company />
<NoWarn>1701;1702;1705;15731591</NoWarn>
<NoWarn>1701;1702;1705;1573;1591</NoWarn>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../WikiClientLibrary.snk</AssemblyOriginatorKeyFile>
<PublishRepositoryUrl>True</PublishRepositoryUrl>
Expand Down

0 comments on commit b196d56

Please sign in to comment.