Skip to content

Commit f778ec2

Browse files
committed
chore: code linting
Signed-off-by: Vincent Biret <[email protected]>
1 parent a2e30c3 commit f778ec2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ public static bool IsOperationOverload(this IEdmModel model, IEdmOperation opera
157157
Utils.CheckArgumentNull(operation, nameof(operation));
158158

159159
return model.GetAllElements().OfType<IEdmOperation>()
160-
.Where(o => o.IsBound == operation.IsBound && o.FullName() == operation.FullName() &&
160+
.Count(o => o.IsBound == operation.IsBound && o.FullName() == operation.FullName() &&
161161
o.Parameters.First().Type.Definition.FullTypeName() == operation.Parameters.First().Type.Definition.FullTypeName()
162-
).Count() > 1;
162+
) > 1;
163163
}
164164

165165
/// <summary>
@@ -180,7 +180,7 @@ public static bool OperationTargetsMultiplePaths(this IEdmModel model, IEdmOpera
180180

181181
return model.EntityContainer.EntitySets().Select(static x => x.EntityType)
182182
.Concat(model.EntityContainer.Singletons().Select(static x => x.EntityType))
183-
.Where(x => x.FullName().Equals(bindingParameterType.FullName(), StringComparison.OrdinalIgnoreCase)).Count() > 1;
183+
.Count(x => x.FullName().Equals(bindingParameterType.FullName(), StringComparison.OrdinalIgnoreCase)) > 1;
184184
}
185185

186186
/// <summary>
@@ -200,7 +200,7 @@ public static bool IsOperationImportOverload(this IEdmModel model, IEdmOperation
200200
}
201201

202202
return model.EntityContainer.OperationImports()
203-
.Where(o => o.Operation.IsBound == operationImport.Operation.IsBound && o.Name == operationImport.Name).Count() > 1;
203+
.Count(o => o.Operation.IsBound == operationImport.Operation.IsBound && o.Name == operationImport.Name) > 1;
204204
}
205205

206206
/// <summary>

src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected override void Initialize(ODataContext context, ODataPath path)
6565

6666
// Check whether path is a navigation property path
6767
IsNavigationPropertyPath = Path.Segments.Contains(
68-
Path.Segments.Where(segment => segment is ODataNavigationPropertySegment).FirstOrDefault());
68+
Path.Segments.FirstOrDefault(segment => segment is ODataNavigationPropertySegment));
6969

7070
LastSegmentIsStreamPropertySegment = Path.LastSegment.Kind == ODataSegmentKind.StreamProperty;
7171

0 commit comments

Comments
 (0)