Skip to content

Commit

Permalink
Housekeeping -- copyright updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaben committed Feb 10, 2025
1 parent 6813c91 commit ec17cdc
Show file tree
Hide file tree
Showing 59 changed files with 95 additions and 104 deletions.
2 changes: 1 addition & 1 deletion lib/Domain/Builders/BaseBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/BaseChromiumBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/BaseMergeBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/Faceted/AssetBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
8 changes: 1 addition & 7 deletions lib/Domain/Builders/Faceted/ConfigBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,8 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.



namespace Gotenberg.Sharp.API.Client.Domain.Builders.Faceted;

public sealed class ConfigBuilder
Expand Down Expand Up @@ -61,7 +59,6 @@ public ConfigBuilder ResultFileName(string resultFileName)
{
return this.SetResultFileName(resultFileName);
}


public ConfigBuilder SetTrace(string trace)
{
Expand All @@ -73,7 +70,6 @@ public ConfigBuilder SetTrace(string trace)
return this;
}


public ConfigBuilder AddWebhook(Action<WebhookBuilder> action)
{
if (action == null) throw new ArgumentNullException(nameof(action));
Expand All @@ -85,14 +81,12 @@ public ConfigBuilder AddWebhook(Action<WebhookBuilder> action)
return this;
}


public ConfigBuilder SetWebhook(Webhook webhook)
{
this._requestConfig.Webhook = webhook ?? throw new ArgumentNullException(nameof(webhook));

return this;
}


[Obsolete("Renamed: Use SetWebhook instead.")]
public ConfigBuilder AddWebhook(Webhook webhook)
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/Faceted/Margins.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/Faceted/PaperSizes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/Faceted/PdfFormats.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/Faceted/UrlExtraResourcesBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/Faceted/UrlHeaderFooterBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/Faceted/WebhookBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/MergeBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/MergeOfficeBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/PdfConversionBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Builders/UrlRequestBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/ContentTypes/IResolveContentType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/ApiRequests/IApiRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/BuildRequestBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/ChromeRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/AssetDictionary.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/ContentItem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/ExtraHttpHeaders.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/FullDocument.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/HeaderFooterDocument.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/HtmlConversionBehaviors.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/RequestConfig.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/UrlExtras/ExtraUrlResources.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/Facets/Webhook.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/HtmlRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/IConvertToHttpContent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/MergeOfficeConstants.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/MergeOfficeRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/MergeRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/PdfConversionRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Domain/Requests/UrlRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Extensions/DictionaryExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Extensions/EnumExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Extensions/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Extensions/HttpRequestExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Extensions/IntExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Extensions/KeyValuePairExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion lib/Extensions/MergeOfficeRequestExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
76 changes: 37 additions & 39 deletions lib/Extensions/RequestInterfaceExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Chris Mohan, Jaben Cargman
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
// and GotenbergSharpApiClient Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,49 +13,47 @@
// See the License for the specific language governing permissions and
// limitations under the License.



namespace Gotenberg.Sharp.API.Client.Extensions;

public static class RequestInterfaceExtensions
namespace Gotenberg.Sharp.API.Client.Extensions
{
private const string BoundaryPrefix = Constants.HttpContent.MultipartData.BoundaryPrefix;

public static IEnumerable<HttpContent> IfNullEmptyContent(
this IConvertToHttpContent? converter)
public static class RequestInterfaceExtensions
{
return converter?.ToHttpContent() ?? Enumerable.Empty<HttpContent>();
}
private const string BoundaryPrefix = Constants.HttpContent.MultipartData.BoundaryPrefix;

/// <summary>
/// A helper method for the linqPad scripts
/// </summary>
/// <param name="items"></param>
/// <param name="includeNonText"></param>
/// <returns></returns>

public static IEnumerable<object> ToDumpFriendlyFormat(
this IEnumerable<HttpContent> items,
bool includeNonText = false)
{
return items.Select(
c =>
{
var includeContent = includeNonText ||
(c.Headers.ContentType?.ToString().StartsWith("text"))
.GetValueOrDefault();
public static IEnumerable<HttpContent> IfNullEmptyContent(
this IConvertToHttpContent? converter)
{
return converter?.ToHttpContent() ?? Enumerable.Empty<HttpContent>();
}

return new
/// <summary>
/// A helper method for the linqPad scripts
/// </summary>
/// <param name="items"></param>
/// <param name="includeNonText"></param>
/// <returns></returns>
public static IEnumerable<object> ToDumpFriendlyFormat(
this IEnumerable<HttpContent> items,
bool includeNonText = false)
{
return items.Select(
c =>
{
Headers = new
var includeContent = includeNonText ||
(c.Headers.ContentType?.ToString().StartsWith("text"))
.GetValueOrDefault();

return new
{
ContentType = string.Join(" | ", c.Headers.ContentType),
Disposition = string.Join(" | ", c.Headers.ContentDisposition)
},
Content = includeContent
? c.ReadAsStringAsync().Result
: "-its not text-"
};
});
Headers = new
{
ContentType = string.Join(" | ", c.Headers.ContentType),
Disposition = string.Join(" | ", c.Headers.ContentDisposition)
},
Content = includeContent
? c.ReadAsStringAsync().Result
: "-its not text-"
};
});
}
}
}
Loading

0 comments on commit ec17cdc

Please sign in to comment.