-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lots of changes.. this one targets v 6.x and above -- works with the …
…changed merge endpoint
- Loading branch information
Chris Mohan
committed
Nov 6, 2019
1 parent
5c7582b
commit 0f2808a
Showing
8 changed files
with
100 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Aire/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gotenberg/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Pdfs/@EntryIndexedValue">True</s:Boolean> | ||
|
||
<s:Boolean x:Key="/Default/UserDictionary/Words/=suppressions/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/CaptiveAire.Gotenberg.App.API.Client/Extensions/IntExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Gotenberg.App.API.Sharp.Client - Copyright (c) 2019 CaptiveAire | ||
|
||
using System; | ||
using System.Linq; | ||
|
||
namespace CaptiveAire.Gotenberg.App.API.Sharp.Client.Extensions | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public static class IntExtensions | ||
{ | ||
const int alphabetLength = 26; | ||
static readonly char[] _alphabet = Enumerable.Range('A', 'Z' - 'A' + 1).Select(c => (char) c).ToArray(); | ||
|
||
/// <summary> | ||
/// Returns a-z for the first 26 (0-25); then za - zz for the next; zza - zzz, etc. | ||
/// </summary> | ||
/// <remarks> | ||
/// Useful pdf merges. Gotenberg merges them alphabetically by file name | ||
/// https://thecodingmachine.github.io/gotenberg/#merge | ||
/// </remarks> | ||
/// <param name="sortNumber"></param> | ||
/// <returns></returns> | ||
public static string ToAlphabeticallySortableName(this int sortNumber) | ||
{ | ||
if(sortNumber < 0) throw new ArgumentOutOfRangeException(nameof(sortNumber)); | ||
|
||
return $"{new string('Z', sortNumber / alphabetLength)}{_alphabet[sortNumber % alphabetLength]}"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters