1- // Copyright 2019-2024 Chris Mohan, Jaben Cargman
1+ // Copyright 2019-2025 Chris Mohan, Jaben Cargman
22// and GotenbergSharpApiClient Contributors
33//
44// Licensed under the Apache License, Version 2.0 (the "License");
1313// See the License for the specific language governing permissions and
1414// limitations under the License.
1515
16-
17-
1816namespace Gotenberg . Sharp . API . Client . Domain . Builders . Faceted ;
1917
2018/// <summary>
@@ -36,33 +34,35 @@ public DocumentBuilder(FullDocument content, Action<bool> setContainsMarkdown)
3634
3735 #region body
3836
39-
37+ [ Obsolete ( "Use SetContainsMarkdown()" ) ]
4038 public DocumentBuilder ContainsMarkdown ( bool containsMarkdown = true )
4139 {
4240 this . _setContainsMarkdown ( containsMarkdown ) ;
4341 return this ;
4442 }
4543
46-
44+ public DocumentBuilder SetContainsMarkdown ( bool containsMarkdown = true )
45+ {
46+ this . _setContainsMarkdown ( containsMarkdown ) ;
47+ return this ;
48+ }
49+
4750 public DocumentBuilder SetBody ( ContentItem body )
4851 {
4952 this . _content . Body = body ?? throw new ArgumentNullException ( nameof ( body ) ) ;
5053 return this ;
5154 }
5255
53-
5456 public DocumentBuilder SetBody ( string body )
5557 {
5658 return this . SetBody ( new ContentItem ( body ) ) ;
5759 }
5860
59-
6061 public DocumentBuilder SetBody ( byte [ ] body )
6162 {
6263 return this . SetBody ( new ContentItem ( body ) ) ;
6364 }
6465
65-
6666 public DocumentBuilder SetBody ( Stream body )
6767 {
6868 return this . SetBody ( new ContentItem ( body ) ) ;
@@ -72,26 +72,22 @@ public DocumentBuilder SetBody(Stream body)
7272
7373 #region header
7474
75-
7675 public DocumentBuilder SetHeader ( ContentItem header )
7776 {
7877 this . _content . Header = header ?? throw new ArgumentNullException ( nameof ( header ) ) ;
7978 return this ;
8079 }
8180
82-
8381 public DocumentBuilder SetHeader ( string header )
8482 {
8583 return this . SetHeader ( new ContentItem ( header ) ) ;
8684 }
8785
88-
8986 public DocumentBuilder SetHeader ( byte [ ] header )
9087 {
9188 return this . SetHeader ( new ContentItem ( header ) ) ;
9289 }
9390
94-
9591 public DocumentBuilder SetHeader ( Stream header )
9692 {
9793 return this . SetHeader ( new ContentItem ( header ) ) ;
@@ -101,26 +97,22 @@ public DocumentBuilder SetHeader(Stream header)
10197
10298 #region footer
10399
104-
105100 public DocumentBuilder SetFooter ( ContentItem footer )
106101 {
107102 this . _content . Footer = footer ?? throw new ArgumentNullException ( nameof ( footer ) ) ;
108103 return this ;
109104 }
110105
111-
112106 public DocumentBuilder SetFooter ( string footer )
113107 {
114108 return this . SetFooter ( new ContentItem ( footer ) ) ;
115109 }
116110
117-
118111 public DocumentBuilder SetFooter ( byte [ ] footer )
119112 {
120113 return this . SetFooter ( new ContentItem ( footer ) ) ;
121114 }
122115
123-
124116 public DocumentBuilder SetFooter ( Stream footer )
125117 {
126118 return this . SetFooter ( new ContentItem ( footer ) ) ;
0 commit comments