Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RobThree committed May 28, 2022
1 parent 1ef2bc2 commit c4eee95
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 212 deletions.
8 changes: 6 additions & 2 deletions IdGen.DependencyInjection/IdGen.DependencyInjection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<TargetFramework>netstandard2.0</TargetFramework>
<Authors>RobIII</Authors>
<Company>Devcorner.nl</Company>
<PackageId>IdGen.Configuration</PackageId>
<PackageId>IdGen.DependencyInjection</PackageId>
<Product>IdGen.DependencyInjection</Product>
<Copyright>Copyright © 2015 - 2022 Devcorner.nl</Copyright>
<Copyright>Copyright © 2022 Devcorner.nl</Copyright>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/RobThree/IdGen</PackageProjectUrl>
Expand All @@ -23,6 +23,10 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
<DocumentationFile>bin\Release\IdGen.DependencyInjection.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\IdGen\IdGen.csproj" />
</ItemGroup>
Expand Down
17 changes: 17 additions & 0 deletions IdGen.DependencyInjection/IdGenServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,28 @@

namespace IdGen.DependencyInjection
{
/// <summary>
/// Helper class to integrate IdGen with Microsoft.Extensions.DependencyInjection
/// </summary>
public static class IdGenServiceCollectionExtensions
{
/// <summary>
/// Registers a singleton <see cref="IdGenerator"/> with the given <paramref name="generatorId"/>.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to register the singleton <see cref="IdGenerator"/> on.</param>
/// <param name="generatorId">The generator-id to use for the singleton <see cref="IdGenerator"/>.</param>
/// <returns>The given <see cref="IServiceCollection"/> with the registered singleton in it.</returns>
public static IServiceCollection AddIdGen(this IServiceCollection services, int generatorId)
=> AddIdGen(services, generatorId, () => IdGeneratorOptions.Default);

/// <summary>
/// Registers a singleton <see cref="IdGenerator"/> with the given <paramref name="generatorId"/> and <see cref="IdGeneratorOptions"/>.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to register the singleton <see cref="IdGenerator"/> on.</param>
/// <param name="generatorId">The generator-id to use for the singleton <see cref="IdGenerator"/>.</param>
/// <param name="options">The <see cref="IdGeneratorOptions"/> for the singleton <see cref="IdGenerator"/>.</param>
/// <returns>The given <see cref="IServiceCollection"/> with the registered singleton <see cref="IdGenerator"/> in it.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="options"/> is null</exception>
public static IServiceCollection AddIdGen(this IServiceCollection services, int generatorId, Func<IdGeneratorOptions> options)
{
if (options == null)
Expand Down
74 changes: 37 additions & 37 deletions IdGen/IdGen.csproj
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.1</TargetFrameworks>
<Authors>RobIII</Authors>
<Company>Devcorner.nl</Company>
<PackageId>IdGen</PackageId>
<Product>IdGen</Product>
<Copyright>Copyright © 2015 - 2022 Devcorner.nl</Copyright>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/RobThree/IdGen</PackageProjectUrl>
<PackageTags>scalable unique id generator distributed</PackageTags>
<PackageReleaseNotes>Minor internal changes</PackageReleaseNotes>
<Description>Twitter Snowflake-alike ID generator for .Net</Description>
<Version>3.0.1</Version>
<RootNamespace>IdGen</RootNamespace>
<PackageIcon>logo.png</PackageIcon>
<PackageIconUrl />
<RepositoryUrl>https://github.com/RobThree/IdGen</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netstandard1.1</TargetFrameworks>
<Authors>RobIII</Authors>
<Company>Devcorner.nl</Company>
<PackageId>IdGen</PackageId>
<Product>IdGen</Product>
<Copyright>Copyright © 2015 - 2022 Devcorner.nl</Copyright>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/RobThree/IdGen</PackageProjectUrl>
<PackageTags>scalable unique id generator distributed</PackageTags>
<PackageReleaseNotes>Minor internal changes</PackageReleaseNotes>
<Description>Twitter Snowflake-alike ID generator for .Net</Description>
<Version>3.0.1</Version>
<RootNamespace>IdGen</RootNamespace>
<PackageIcon>logo.png</PackageIcon>
<PackageIconUrl />
<RepositoryUrl>https://github.com/RobThree/IdGen</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard1.1|AnyCPU'">
<DocumentationFile>bin\Release\IdGen.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard1.1|AnyCPU'">
<DocumentationFile>bin\Release\IdGen.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\logo.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\logo.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
28 changes: 28 additions & 0 deletions IdGenDocumentation/Content/VersionHistory/v3.0.1.0.aml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="25494d74-9259-4b3b-b6dd-c9475c4a1061" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>
Version 3.0.1.0 was released on 2022-05-28.
</para>
</introduction>

<section>
<title>Changes in This Release</title>
<content>

<list class="bullet">
<listItem>
<para>Internal changes and refactoring</para>
</listItem>
</list>

</content>
</section>

<relatedTopics>
<link xlink:href="4491ec46-0001-46c1-88b7-3dd2ee8472f3" />
</relatedTopics>

</developerConceptualDocument>
</topic>
Loading

0 comments on commit c4eee95

Please sign in to comment.