Skip to content

Commit 4959457

Browse files
committed
feat: Add nullable annotations to model method parameters
1 parent 4efa540 commit 4959457

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

Contentstack.Management.Core/Models/PublishQueue.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ internal PublishQueue(Stack stack, string? uid = null)
3434
/// </code></pre>
3535
/// </example>
3636
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
37-
public virtual ContentstackResponse FindAll(ParameterCollection collection = null)
37+
public virtual ContentstackResponse FindAll(ParameterCollection? collection = null)
3838
{
3939
stack.ThrowIfNotLoggedIn();
4040
ThrowIfUidNotEmpty();
@@ -55,7 +55,7 @@ public virtual ContentstackResponse FindAll(ParameterCollection collection = nul
5555
/// </code></pre>
5656
/// </example>
5757
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
58-
public virtual Task<ContentstackResponse> FindAllAsync(ParameterCollection collection = null)
58+
public virtual Task<ContentstackResponse> FindAllAsync(ParameterCollection? collection = null)
5959
{
6060
stack.ThrowIfNotLoggedIn();
6161
ThrowIfUidNotEmpty();
@@ -76,7 +76,7 @@ public virtual Task<ContentstackResponse> FindAllAsync(ParameterCollection colle
7676
/// </code></pre>
7777
/// </example>
7878
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
79-
public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
79+
public virtual ContentstackResponse Fetch(ParameterCollection? collection = null)
8080
{
8181
stack.ThrowIfNotLoggedIn();
8282
ThrowIfUidEmpty();
@@ -97,7 +97,7 @@ public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
9797
/// </code></pre>
9898
/// </example>
9999
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
100-
public virtual Task<ContentstackResponse> FetchAsync(ParameterCollection collection = null)
100+
public virtual Task<ContentstackResponse> FetchAsync(ParameterCollection? collection = null)
101101
{
102102
stack.ThrowIfNotLoggedIn();
103103
ThrowIfUidEmpty();
@@ -117,7 +117,7 @@ public virtual Task<ContentstackResponse> FetchAsync(ParameterCollection collect
117117
/// </code></pre>
118118
/// </example>
119119
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
120-
public virtual ContentstackResponse Cancel(ParameterCollection collection = null)
120+
public virtual ContentstackResponse Cancel(ParameterCollection? collection = null)
121121
{
122122
stack.ThrowIfNotLoggedIn();
123123
ThrowIfUidEmpty();
@@ -137,7 +137,7 @@ public virtual ContentstackResponse Cancel(ParameterCollection collection = null
137137
/// </code></pre>
138138
/// </example>
139139
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
140-
public virtual Task<ContentstackResponse> CancelAsync(ParameterCollection collection = null)
140+
public virtual Task<ContentstackResponse> CancelAsync(ParameterCollection? collection = null)
141141
{
142142
stack.ThrowIfNotLoggedIn();
143143
ThrowIfUidEmpty();

Contentstack.Management.Core/Models/Release.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Contentstack.Management.Core.Models
99
{
1010
public class Release : BaseModel<ReleaseModel>
1111
{
12-
internal Release(Stack stack, string uid = null)
12+
internal Release(Stack stack, string? uid = null)
1313
: base(stack, "release", uid)
1414
{
1515
resourcePath = uid == null ? "/releases" : $"/releases/{uid}";
@@ -44,7 +44,7 @@ public Query Query()
4444
/// </example>
4545
/// <param name="model">Release Model for creating ReleaseModel.</param>
4646
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
47-
public override ContentstackResponse Create(ReleaseModel model, ParameterCollection collection = null)
47+
public override ContentstackResponse Create(ReleaseModel model, ParameterCollection? collection = null)
4848
{
4949
return base.Create(model, collection);
5050
}
@@ -62,7 +62,7 @@ public override ContentstackResponse Create(ReleaseModel model, ParameterCollect
6262
/// </example>
6363
/// <param name="model">Release Model Model for creating ReleaseModel.</param>
6464
/// <returns>The Task.</returns>
65-
public override Task<ContentstackResponse> CreateAsync(ReleaseModel model, ParameterCollection collection = null)
65+
public override Task<ContentstackResponse> CreateAsync(ReleaseModel model, ParameterCollection? collection = null)
6666
{
6767
return base.CreateAsync(model, collection);
6868
}
@@ -79,7 +79,7 @@ public override Task<ContentstackResponse> CreateAsync(ReleaseModel model, Param
7979
/// </example>
8080
/// <param name="model">Release Model for creating ReleaseModel.</param>
8181
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
82-
public override ContentstackResponse Update(ReleaseModel model, ParameterCollection collection = null)
82+
public override ContentstackResponse Update(ReleaseModel model, ParameterCollection? collection = null)
8383
{
8484
return base.Update(model, collection);
8585
}
@@ -96,7 +96,7 @@ public override ContentstackResponse Update(ReleaseModel model, ParameterCollect
9696
/// </example>
9797
/// <param name="model">Release Model for creating ReleaseModel.</param>
9898
/// <returns>The Task.</returns>
99-
public override Task<ContentstackResponse> UpdateAsync(ReleaseModel model, ParameterCollection collection = null)
99+
public override Task<ContentstackResponse> UpdateAsync(ReleaseModel model, ParameterCollection? collection = null)
100100
{
101101
return base.UpdateAsync(model, collection);
102102
}
@@ -111,7 +111,7 @@ public override Task<ContentstackResponse> UpdateAsync(ReleaseModel model, Param
111111
/// </code></pre>
112112
/// </example>
113113
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
114-
public override ContentstackResponse Fetch(ParameterCollection collection = null)
114+
public override ContentstackResponse Fetch(ParameterCollection? collection = null)
115115
{
116116
return base.Fetch(collection);
117117
}
@@ -126,7 +126,7 @@ public override ContentstackResponse Fetch(ParameterCollection collection = null
126126
/// </code></pre>
127127
/// </example>
128128
/// <returns>The Task.</returns>
129-
public override Task<ContentstackResponse> FetchAsync(ParameterCollection collection = null)
129+
public override Task<ContentstackResponse> FetchAsync(ParameterCollection? collection = null)
130130
{
131131
return base.FetchAsync(collection);
132132
}
@@ -141,7 +141,7 @@ public override Task<ContentstackResponse> FetchAsync(ParameterCollection collec
141141
/// </code></pre>
142142
/// </example>
143143
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
144-
public override ContentstackResponse Delete(ParameterCollection collection = null)
144+
public override ContentstackResponse Delete(ParameterCollection? collection = null)
145145
{
146146
return base.Delete(collection);
147147
}
@@ -156,7 +156,7 @@ public override ContentstackResponse Delete(ParameterCollection collection = nul
156156
/// </code></pre>
157157
/// </example>
158158
/// <returns>The Task.</returns>
159-
public override Task<ContentstackResponse> DeleteAsync(ParameterCollection collection = null)
159+
public override Task<ContentstackResponse> DeleteAsync(ParameterCollection? collection = null)
160160
{
161161
return base.DeleteAsync(collection);
162162
}

0 commit comments

Comments
 (0)