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

Add Docstrings to all non-private Classes, Properties, Fields and Methods #5

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
8 changes: 7 additions & 1 deletion EDIFileLoader.Standard/EDIFileLoader.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

<DocumentationFile>bin\Release\EDIFileLoader.Core.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\EDIFileLoader.Core.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions EDIFileLoader/EDIFileLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@

</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\EDIFileLoader.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\EDIFileLoader.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.8.0" />
</ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion EDILibrary/EDILibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputType>Library</OutputType>
<DocumentationFile>bin\Debug\EDILibrary.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -31,7 +33,8 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

<DocumentationFile>bin\Release\EDILibrary.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
21 changes: 16 additions & 5 deletions EDILibrary/Exceptions/BadFormatException.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
// Copyright (c) 2017 Hochfrequenz Unternehmensberatung GmbH
using System;
using System;

namespace EDILibrary.Exceptions
{
/// <summary>
/// The exception is thrown if the combination of a edifact format and its version is not supported.
/// </summary>
/// <seealso cref="BadPIDException"/>
public class BadFormatException : Exception
{
string _format;
string _version;
public override string Message { get { return string.Format("Format {0} in version {1} could not be found", _format, _version); } }
private string _format;
private string _version;

/// <inheritdoc />
public override string Message => $"Format {_format} in version {_version} could not be found";

/// <summary>
/// Initialize the Exception by providing both the (stringly typed) format and the version.
/// </summary>
/// <param name="format"></param>
/// <param name="version"></param>
public BadFormatException(string format, string version)
{
_format = format;
Expand Down
18 changes: 14 additions & 4 deletions EDILibrary/Exceptions/BadPIDException.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
// Copyright (c) 2017 Hochfrequenz Unternehmensberatung GmbH
using System;
using System;

namespace EDILibrary.Exceptions
{
/// <summary>
/// Exception that is thrown if a pruefidentifikator is not known/not supported (yet).
/// </summary>
/// <seealso cref="BadFormatException"/>
public class BadPIDException : Exception
{
string _pid;
public override string Message { get { return "Pid " + _pid + " is unknown."; } }
private readonly string _pid;

/// <inheritdoc />
public override string Message => "Pid " + _pid + " is unknown.";

/// <summary>
/// Initialize the exception by providing the unsupported prüfidentifikator / message class <paramref name="pid"/>
/// </summary>
/// <param name="pid">e.g. "11099"</param>
public BadPIDException(string pid)
{
_pid = pid;
Expand Down
10 changes: 10 additions & 0 deletions EDILibraryBase/EDILibrary.Standard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\EDILibrary.Standard.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\EDILibrary.Standard.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\EDILibrary\CSVMapper.cs" Link="CSVMapper.cs" />
<Compile Include="..\EDILibrary\Customization.cs" Link="Customization.cs" />
Expand Down