Skip to content

Commit

Permalink
Merge pull request #44 from meokullu/parameters_consistency_0001
Browse files Browse the repository at this point in the history
v2.3.0 #41 Parameters naming.
  • Loading branch information
meokullu authored Sep 19, 2024
2 parents efda803 + 3cbcd48 commit 0faaf06
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#### Removed
-->

### [2.3.0]
#### Changed
* Parameter names on `PreFillCustom(string text, int maxLength, string stringValue = " ")` changed into `PreFillCustom(string context, int maxLength, string text = " ")` [#41](https://github.com/meokullu/PreFill/issues/40)
* Parameter names on `PreFillCustom(string text, int maxLength, char charValue = ' ')` changed into `PreFillCustom(string context, int maxLength, char text = ' ')` [#41](https://github.com/meokullu/PreFill/issues/40)

### [2.2.2]
#### Changed
* Removed unused usings.
Expand Down
14 changes: 7 additions & 7 deletions PreFill/Prefill.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>2.2.3</Version>
<AssemblyVersion>2.2.3</AssemblyVersion>
<FileVersion>2.2.3</FileVersion>
<Version>2.3.0</Version>
<AssemblyVersion>2.3.0</AssemblyVersion>
<FileVersion>2.3.0</FileVersion>
<Copyright>Enes Okullu</Copyright>
<Description>PreFill is a project to align horizontally listed output values to right side in order to increase their legibility.</Description>
<Title>PreFill</Title>
Expand All @@ -16,10 +16,10 @@
<RepositoryType>git</RepositoryType>
<PackageTags>data-science; data; data-engineering; alignment; data-analysis; egibility</PackageTags>
<PackageReleaseNotes>
v.2.2.3
*
See changelog (https://github.com/meokullu/PreFill/blob/master/CHANGELOG.md)
</PackageReleaseNotes>
v2.3.0
* Parameter names changed on `PreFillCustom(string text, int maxLength, string stringValue = " ")` and `PreFillCustom(string text, int maxLength, char charValue = ' ')`. First parameter named as context and third value names and text. [#41](https://github.com/meokullu/PreFill/issues/40)
See changelog (https://github.com/meokullu/PreFill/blob/master/CHANGELOG.md)
</PackageReleaseNotes>
<SignAssembly>False</SignAssembly>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down
20 changes: 10 additions & 10 deletions PreFill/src/PreFill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,33 +136,33 @@ public static string PreFillCustom(long number, int maxDigit, char text = ' ')
/// <summary>
/// Calculates length of given text then creates string with prefilling value of specified character before given numtextber on limit of maximum length.
/// </summary>
/// <param name="text">A text whose prefill value to be found.</param>
/// <param name="context">A text whose prefill value to be found.</param>
/// <param name="maxLength">Maximum length of context including specified number and prefilling.</param>
/// <param name="stringValue">Specified text whose will be used for prefilling.</param>
/// <param name="text">Specified text whose will be used for prefilling.</param>
/// <returns>Returns prefill value for specified text.</returns>
public static string PreFillCustom(string text, int maxLength, string stringValue = " ")
public static string PreFillCustom(string context, int maxLength, string text = " ")
{
// Getting length of given text.
int textLength = maxLength - GetLengthOfString(text);
int textLength = maxLength - GetLengthOfString(context);

// Calling FillString method to get prefilling value.
return FillString(textLength, stringValue);
return FillString(textLength, text);
}

/// <summary>
/// Calculates length of given text then creates string with prefilling value of specified character before given numtextber on limit of maximum length.
/// </summary>
/// <param name="text">A text whose prefill value to be found.</param>
/// <param name="context">A text whose prefill value to be found.</param>
/// <param name="maxLength">Maximum length of context including specified number and prefilling.</param>
/// <param name="charValue">Specified character whose will be used for prefilling.</param>
/// <param name="text">Specified character whose will be used for prefilling.</param>
/// <returns>Returns prefill value for specified text.</returns>
public static string PreFillCustom(string text, int maxLength, char charValue = ' ')
public static string PreFillCustom(string context, int maxLength, char text = ' ')
{
// Getting length of given text.
int textLength = maxLength - GetLengthOfString(text);
int textLength = maxLength - GetLengthOfString(context);

// Calling FillChar method to get prefilling value.
return FillChar(textLength, charValue);
return FillChar(textLength, text);
}

/// <summary>
Expand Down

0 comments on commit 0faaf06

Please sign in to comment.