-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from ZEXSM/feature/support-navigations
feature/support navigations
- Loading branch information
Showing
12 changed files
with
139 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/OData.QueryBuilder/Conventions/AddressingEntities/Query/IODataQueryKey.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
using OData.QueryBuilder.Conventions.AddressingEntities.Options; | ||
using System; | ||
using System.Linq.Expressions; | ||
|
||
namespace OData.QueryBuilder.Conventions.AddressingEntities.Query | ||
{ | ||
public interface IODataQueryKey<TEntity> : IODataOptionKey<IODataQueryKey<TEntity>, TEntity>, IODataQuery | ||
{ | ||
public IAddressingEntries<TResource> For<TResource>(Expression<Func<TEntity, object>> resource); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/OData.QueryBuilder/Extensions/StringBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Text; | ||
|
||
namespace OData.QueryBuilder.Extensions | ||
{ | ||
internal static class StringBuilderExtensions | ||
{ | ||
public static StringBuilder LastRemove(this StringBuilder stringBuilder, char @char) | ||
{ | ||
var lastIndex = stringBuilder.Length - 1; | ||
|
||
if (stringBuilder[lastIndex] == @char) | ||
{ | ||
stringBuilder.Remove(lastIndex, 1); | ||
} | ||
|
||
return stringBuilder; | ||
} | ||
|
||
public static StringBuilder LastReplace(this StringBuilder stringBuilder, char oldChar, char newChar) | ||
{ | ||
var lastIndex = stringBuilder.Length - 1; | ||
|
||
if (stringBuilder[lastIndex] == oldChar) | ||
{ | ||
stringBuilder[lastIndex] = newChar; | ||
} | ||
|
||
return stringBuilder; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters