Skip to content

Commit 8169f93

Browse files
Merge pull request #546 from johelvisguzman/service
Added [NotNull] attributes to the service base class
2 parents 54ba6e5 + bdae3e0 commit 8169f93

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/DotNetToolkit.Repository/Services/ServiceBase.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public virtual TEntity Get([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull]
225225
/// <param name="key3">The value of the third part of the composite primary key used to match entities against.</param>
226226
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
227227
/// <return>The entity found.</return>
228-
public virtual TEntity Get(TKey1 key1, TKey2 key2, TKey3 key3, params string[] paths)
228+
public virtual TEntity Get([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] TKey3 key3, [NotNull] params string[] paths)
229229
{
230230
using (var uow = UnitOfWorkFactory.Create())
231231
{
@@ -245,7 +245,7 @@ public virtual TEntity Get(TKey1 key1, TKey2 key2, TKey3 key3, params string[] p
245245
/// <param name="key3">The value of the third part of the composite primary key used to match entities against.</param>
246246
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
247247
/// <return>The entity found.</return>
248-
public virtual TEntity Get(TKey1 key1, TKey2 key2, TKey3 key3, params Expression<Func<TEntity, object>>[] paths)
248+
public virtual TEntity Get([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] TKey3 key3, [NotNull] params Expression<Func<TEntity, object>>[] paths)
249249
{
250250
using (var uow = UnitOfWorkFactory.Create())
251251
{
@@ -857,7 +857,7 @@ public virtual IPagedQueryResult<IEnumerable<TResult>> GetGroupBy<TGroupKey, TRe
857857
/// <param name="key3">The value of the third part of the composite primary key used to match entities against.</param>
858858
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
859859
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
860-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, params string[] paths)
860+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] TKey3 key3, [NotNull] params string[] paths)
861861
{
862862
using (var uow = UnitOfWorkFactory.Create())
863863
{
@@ -878,7 +878,7 @@ public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3,
878878
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
879879
/// <param name="cancellationToken">A <see cref="System.Threading.CancellationToken" /> to observe while waiting for the task to complete.</param>
880880
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
881-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, string[] paths, CancellationToken cancellationToken = new CancellationToken())
881+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] TKey3 key3, [NotNull] string[] paths, CancellationToken cancellationToken = new CancellationToken())
882882
{
883883
using (var uow = UnitOfWorkFactory.Create())
884884
{
@@ -898,7 +898,7 @@ public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3,
898898
/// <param name="key3">The value of the third part of the composite primary key used to match entities against.</param>
899899
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
900900
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
901-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, params Expression<Func<TEntity, object>>[] paths)
901+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] TKey3 key3, [NotNull] params Expression<Func<TEntity, object>>[] paths)
902902
{
903903
using (var uow = UnitOfWorkFactory.Create())
904904
{
@@ -919,7 +919,7 @@ public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3,
919919
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
920920
/// <param name="cancellationToken">A <see cref="System.Threading.CancellationToken" /> to observe while waiting for the task to complete.</param>
921921
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
922-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
922+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] TKey3 key3, [NotNull] Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
923923
{
924924
using (var uow = UnitOfWorkFactory.Create())
925925
{
@@ -1580,7 +1580,7 @@ public virtual TEntity Get([NotNull] TKey1 key1, [NotNull] TKey2 key2)
15801580
/// <param name="key2">The value of the second part of the composite primary key used to match entities against.</param>
15811581
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
15821582
/// <return>The entity found.</return>
1583-
public virtual TEntity Get(TKey1 key1, TKey2 key2, params string[] paths)
1583+
public virtual TEntity Get([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] params string[] paths)
15841584
{
15851585
using (var uow = UnitOfWorkFactory.Create())
15861586
{
@@ -1599,7 +1599,7 @@ public virtual TEntity Get(TKey1 key1, TKey2 key2, params string[] paths)
15991599
/// <param name="key2">The value of the second part of the composite primary key used to match entities against.</param>
16001600
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
16011601
/// <return>The entity found.</return>
1602-
public virtual TEntity Get(TKey1 key1, TKey2 key2, params Expression<Func<TEntity, object>>[] paths)
1602+
public virtual TEntity Get([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] params Expression<Func<TEntity, object>>[] paths)
16031603
{
16041604
using (var uow = UnitOfWorkFactory.Create())
16051605
{
@@ -2205,7 +2205,7 @@ public virtual IPagedQueryResult<IEnumerable<TResult>> GetGroupBy<TGroupKey, TRe
22052205
/// <param name="key2">The value of the second part of the composite primary key used to match entities against.</param>
22062206
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
22072207
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
2208-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, params string[] paths)
2208+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] params string[] paths)
22092209
{
22102210
using (var uow = UnitOfWorkFactory.Create())
22112211
{
@@ -2225,7 +2225,7 @@ public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, params strin
22252225
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
22262226
/// <param name="cancellationToken">A <see cref="System.Threading.CancellationToken" /> to observe while waiting for the task to complete.</param>
22272227
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
2228-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, string[] paths, CancellationToken cancellationToken = new CancellationToken())
2228+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] string[] paths, CancellationToken cancellationToken = new CancellationToken())
22292229
{
22302230
using (var uow = UnitOfWorkFactory.Create())
22312231
{
@@ -2244,7 +2244,7 @@ public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, params strin
22442244
/// <param name="key2">The value of the second part of the composite primary key used to match entities against.</param>
22452245
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
22462246
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
2247-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, params Expression<Func<TEntity, object>>[] paths)
2247+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] params Expression<Func<TEntity, object>>[] paths)
22482248
{
22492249
using (var uow = UnitOfWorkFactory.Create())
22502250
{
@@ -2264,7 +2264,7 @@ public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, params Expre
22642264
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
22652265
/// <param name="cancellationToken">A <see cref="System.Threading.CancellationToken" /> to observe while waiting for the task to complete.</param>
22662266
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
2267-
public virtual async Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
2267+
public virtual async Task<TEntity> GetAsync([NotNull] TKey1 key1, [NotNull] TKey2 key2, [NotNull] Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
22682268
{
22692269
using (var uow = UnitOfWorkFactory.Create())
22702270
{
@@ -2918,7 +2918,7 @@ public virtual TEntity Get([NotNull] TKey key)
29182918
/// <param name="key">The value of the primary key for the entity to be found.</param>
29192919
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
29202920
/// <return>The entity found.</return>
2921-
public virtual TEntity Get(TKey key, params string[] paths)
2921+
public virtual TEntity Get([NotNull] TKey key, [NotNull] params string[] paths)
29222922
{
29232923
using (var uow = UnitOfWorkFactory.Create())
29242924
{
@@ -2936,7 +2936,7 @@ public virtual TEntity Get(TKey key, params string[] paths)
29362936
/// <param name="key">The value of the primary key for the entity to be found.</param>
29372937
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
29382938
/// <return>The entity found.</return>
2939-
public virtual TEntity Get(TKey key, params Expression<Func<TEntity, object>>[] paths)
2939+
public virtual TEntity Get([NotNull] TKey key, [NotNull] params Expression<Func<TEntity, object>>[] paths)
29402940
{
29412941
using (var uow = UnitOfWorkFactory.Create())
29422942
{
@@ -3536,7 +3536,7 @@ public virtual IPagedQueryResult<IEnumerable<TResult>> GetGroupBy<TGroupKey, TRe
35363536
/// <param name="key">The value of the primary key for the entity to be found.</param>
35373537
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
35383538
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
3539-
public virtual async Task<TEntity> GetAsync(TKey key, params string[] paths)
3539+
public virtual async Task<TEntity> GetAsync([NotNull] TKey key, [NotNull] params string[] paths)
35403540
{
35413541
using (var uow = UnitOfWorkFactory.Create())
35423542
{
@@ -3555,7 +3555,7 @@ public virtual async Task<TEntity> GetAsync(TKey key, params string[] paths)
35553555
/// <param name="paths">The dot-separated list of related objects to return in the query results.</param>
35563556
/// <param name="cancellationToken">A <see cref="System.Threading.CancellationToken" /> to observe while waiting for the task to complete.</param>
35573557
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
3558-
public virtual async Task<TEntity> GetAsync(TKey key, string[] paths, CancellationToken cancellationToken = new CancellationToken())
3558+
public virtual async Task<TEntity> GetAsync([NotNull] TKey key, [NotNull] string[] paths, CancellationToken cancellationToken = new CancellationToken())
35593559
{
35603560
using (var uow = UnitOfWorkFactory.Create())
35613561
{
@@ -3573,7 +3573,7 @@ public virtual async Task<TEntity> GetAsync(TKey key, params string[] paths)
35733573
/// <param name="key">The value of the primary key for the entity to be found.</param>
35743574
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
35753575
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
3576-
public virtual async Task<TEntity> GetAsync(TKey key, params Expression<Func<TEntity, object>>[] paths)
3576+
public virtual async Task<TEntity> GetAsync([NotNull] TKey key, [NotNull] params Expression<Func<TEntity, object>>[] paths)
35773577
{
35783578
using (var uow = UnitOfWorkFactory.Create())
35793579
{
@@ -3592,7 +3592,7 @@ public virtual async Task<TEntity> GetAsync(TKey key, params Expression<Func<TEn
35923592
/// <param name="paths">A collection of lambda expressions representing the paths to include.</param>
35933593
/// <param name="cancellationToken">A <see cref="System.Threading.CancellationToken" /> to observe while waiting for the task to complete.</param>
35943594
/// <returns>The <see cref="System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the entity found.</returns>
3595-
public virtual async Task<TEntity> GetAsync(TKey key, Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
3595+
public virtual async Task<TEntity> GetAsync([NotNull] TKey key, [NotNull] Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
35963596
{
35973597
using (var uow = UnitOfWorkFactory.Create())
35983598
{

0 commit comments

Comments
 (0)