Skip to content

Commit a0c4b58

Browse files
authored
fix/484 Use IEnumerable<T> instead of IList<T>. (#485)
1 parent a295eee commit a0c4b58

15 files changed

+58
-57
lines changed

arangodb-net-standard.Test/TransactionApi/TransactionApiClientTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Linq;
23
using System.Threading.Tasks;
34
using ArangoDBNetStandard;
45
using ArangoDBNetStandard.DocumentApi.Models;
@@ -185,7 +186,7 @@ public async Task GetAllRunningTransactions_ShouldSucceed()
185186
var result = await _adb.Transaction.GetAllRunningTransactions();
186187

187188
// Check for all the running transactions.
188-
Assert.Equal(2, result.Transactions.Count);
189+
Assert.Equal(2, result.Transactions.Count());
189190
Assert.Contains(result.Transactions, x => x.State.Equals(StreamTransactionStatus.Running));
190191
}
191192

arangodb-net-standard/AdminApi/Models/EngineSupports.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace ArangoDBNetStandard.AdminApi.Models
44
{
5-
public class EngineSupports
5+
public class EngineSupports
66
{
77
public bool DFDB { get; set; }
8-
public IList<string> Indexes { get; set; }
8+
public IEnumerable<string> Indexes { get; set; }
99
public EngineAlias Aliases { get; set; }
1010
}
11-
}
11+
}

arangodb-net-standard/AqlFunctionApi/Models/CachedAqlQueryResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ public class CachedAqlQueryResult
5656
/// <summary>
5757
/// An array of collections/Views the query was using
5858
/// </summary>
59-
public IList<string> DataSources { get; set; }
59+
public IEnumerable<string> DataSources { get; set; }
6060
}
61-
}
61+
}

arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryBodyOptimizer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public class PostExplainAqlQueryBodyOptimizer
1818
/// which matches all optimizer rules.
1919
/// -all disables all rules.
2020
/// </summary>
21-
public IList<string> Rules { get; set; }
21+
public IEnumerable<string> Rules { get; set; }
2222
}
23-
}
23+
}

arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponse.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ArangoDBNetStandard.AqlFunctionApi.Models
66
/// Response from <see cref="AqlFunctionApiClient.PostExplainAqlQueryAsync"/>
77
/// See https://www.arangodb.com/docs/stable/http/aql-query.html#explain-an-aql-query
88
/// </summary>
9-
public class PostExplainAqlQueryResponse:ResponseBase
9+
public class PostExplainAqlQueryResponse : ResponseBase
1010
{
1111
/// <summary>
1212
/// The query execution plan.
@@ -18,7 +18,7 @@ public class PostExplainAqlQueryResponse:ResponseBase
1818
/// <see cref="PostExplainAqlQueryBodyOptions.AllPlans"/>
1919
/// is set to true.
2020
/// </summary>
21-
public IList<PostExplainAqlQueryResponsePlan> Plans { get; set; }
21+
public IEnumerable<PostExplainAqlQueryResponsePlan> Plans { get; set; }
2222

2323
/// <summary>
2424
/// Indicates whether the query results can be
@@ -31,11 +31,11 @@ public class PostExplainAqlQueryResponse:ResponseBase
3131
/// An array of warnings that occurred during
3232
/// optimization or execution plan creation.
3333
/// </summary>
34-
public IList<string> Warnings { get; set; }
34+
public IEnumerable<string> Warnings { get; set; }
3535

3636
/// <summary>
3737
/// Optimizer statistics.
3838
/// </summary>
3939
public PostExplainAqlQueryResponseStats Stats { get; set; }
4040
}
41-
}
41+
}

arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponseCondition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public class PostExplainAqlQueryResponseCondition
1111
public int? Value { get; set; }
1212
public string VType { get; set; }
1313
public int? VTypeId { get; set; }
14-
public IList<PostExplainAqlQueryResponseCondition> SubNodes { get; set; }
14+
public IEnumerable<PostExplainAqlQueryResponseCondition> SubNodes { get; set; }
1515
}
16-
}
16+
}

arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponseNode.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ namespace ArangoDBNetStandard.AqlFunctionApi.Models
99
public class PostExplainAqlQueryResponseNode
1010
{
1111
public string Type { get; set; }
12-
public IList<int> Dependencies { get; set; }
12+
public IEnumerable<int> Dependencies { get; set; }
1313
public int? Id { get; set; }
1414
public decimal? EstimatedCost { get; set; }
1515
public int? EstimatedNrItems { get; set; }
1616
public bool? Random { get; set; }
1717
public PostExplainAqlQueryResponseIndexHint IndexHint { get; set; }
1818
public PostExplainAqlQueryResponseVariable OutVariable { get; set; }
19-
public IList<string> Projections { get; set; }
19+
public IEnumerable<string> Projections { get; set; }
2020
public string Database { get; set; }
2121
public string Collection { get; set; }
2222
public bool? Count { get; set; }
@@ -28,7 +28,7 @@ public class PostExplainAqlQueryResponseNode
2828
public PostExplainAqlQueryResponseVariable InVariable { get; set; }
2929
public bool? NeedsGatherNodeSort { get; set; }
3030
public bool? IndexCoversProjections { get; set; }
31-
public IList<PostExplainAqlQueryResponseIndex> Indexes { get; set; }
31+
public IEnumerable<PostExplainAqlQueryResponseIndex> Indexes { get; set; }
3232
public PostExplainAqlQueryResponseCondition Condition { get; set; }
3333
public bool? Sorted { get; set; }
3434
public bool? Ascending { get; set; }
@@ -38,4 +38,4 @@ public class PostExplainAqlQueryResponseNode
3838
public int? Offset { get; set; }
3939
public bool? FullCount { get; set; }
4040
}
41-
}
41+
}

arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponsePlan.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ public class PostExplainAqlQueryResponsePlan
1010
/// <summary>
1111
/// The array of execution nodes of the plan.
1212
/// </summary>
13-
public IList<PostExplainAqlQueryResponseNode> Nodes { get; set; }
13+
public IEnumerable<PostExplainAqlQueryResponseNode> Nodes { get; set; }
1414

1515
/// <summary>
1616
/// An array of rules the optimizer applied.
1717
/// </summary>
18-
public IList<string> Rules { get; set; }
18+
public IEnumerable<string> Rules { get; set; }
1919

2020
/// <summary>
2121
/// An array of collections used in the query
2222
/// </summary>
23-
public IList<PostExplainAqlQueryResponseCollection> Collections { get; set; }
23+
public IEnumerable<PostExplainAqlQueryResponseCollection> Collections { get; set; }
2424

2525
/// <summary>
2626
/// Array of variables used in the query
2727
/// (note: this may contain internal
2828
/// variables created by the optimizer)
2929
/// </summary>
30-
public IList<PostExplainAqlQueryResponseVariable> Variables { get; set; }
30+
public IEnumerable<PostExplainAqlQueryResponseVariable> Variables { get; set; }
3131

3232
/// <summary>
3333
/// The total estimated cost for the plan.
@@ -46,4 +46,4 @@ public class PostExplainAqlQueryResponsePlan
4646
/// </summary>
4747
public bool? IsModificationQuery { get; set; }
4848
}
49-
}
49+
}

arangodb-net-standard/AqlFunctionApi/Models/PostParseAqlQueryResponse.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ public class PostParseAqlQueryResponse : ResponseBase
1616
/// <summary>
1717
/// Contains the names of the collections that are involved in the query.
1818
/// </summary>
19-
public IList<string> Collections { get; set; }
19+
public IEnumerable<string> Collections { get; set; }
2020

2121
/// <summary>
2222
/// Contains the binding variables involved in the query.
2323
/// </summary>
24-
public IList<string> BindVars { get; set; }
24+
public IEnumerable<string> BindVars { get; set; }
2525

2626
/// <summary>
2727
/// Tree of data nodes providing information about the query.
2828
/// </summary>
29-
public IList<PostParseAqlQueryResponseAstNode> Ast { get; set; }
29+
public IEnumerable<PostParseAqlQueryResponseAstNode> Ast { get; set; }
3030

3131
/// <summary>
3232
/// When the query is invalid this will contain the error number.
@@ -38,4 +38,4 @@ public class PostParseAqlQueryResponse : ResponseBase
3838
/// </summary>
3939
public string ErrorMessage { get; set; }
4040
}
41-
}
41+
}

arangodb-net-standard/AqlFunctionApi/Models/PostParseAqlQueryResponseAstNode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ public class PostParseAqlQueryResponseAstNode
1212
public string Type { get; set; }
1313
public string Name { get; set; }
1414
public string Value { get; set; }
15-
public IList<PostParseAqlQueryResponseAstNode> SubNodes { get; set; }
15+
public IEnumerable<PostParseAqlQueryResponseAstNode> SubNodes { get; set; }
1616
}
17-
}
17+
}

0 commit comments

Comments
 (0)