Skip to content

Commit

Permalink
Restricting BatchOperationRequestMessage.dependsOnIds from List<strin…
Browse files Browse the repository at this point in the history
…g> to IEnumerable<string>, not allowing element updates.
  • Loading branch information
biaol-odata committed Jan 12, 2018
1 parent 79f9de0 commit ff6102b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public string GroupId
/// <summary>
/// Gets the prerequisite request or group ids.
/// </summary>
public List<string> DependsOnIds
public IEnumerable<string> DependsOnIds
{
get
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ private byte[] ServiceReadRequestAndWriterResponseForMultipartBatchVerifyDepends
batchReader.CreateOperationRequestMessage();

// Verify DependsOnIds are set correctly
List<string> dependsOnIds = operationMessage.DependsOnIds;
IEnumerable<string> dependsOnIds = operationMessage.DependsOnIds;
switch (operationMessage.ContentId)
{
case "1":
case "2A":
Assert.True(dependsOnIds.Count == 0);
Assert.True(dependsOnIds.Count() == 0);
break;

case "2B":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4703,7 +4703,7 @@ public sealed class Microsoft.OData.ODataBatchOperationRequestMessage : IContain
public const readonly string ContentId =

System.IServiceProvider Container { public virtual get; }
System.Collections.Generic.List`1[[System.String]] DependsOnIds { public get; }
System.Collections.Generic.IEnumerable`1[[System.String]] DependsOnIds { public get; }
string GroupId { public get; }
System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String],[System.String]]]] Headers { public virtual get; }
string Method { public virtual get; public virtual set; }
Expand Down

0 comments on commit ff6102b

Please sign in to comment.