-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
314 additions
and
53 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
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
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
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,51 @@ | ||
// Copyright (c) usercode | ||
// https://github.com/usercode/DragonFly | ||
// MIT License | ||
|
||
namespace DragonFly.Query; | ||
|
||
/// <summary> | ||
/// IContentQuery | ||
/// </summary> | ||
public interface IContentQuery | ||
{ | ||
/// <summary> | ||
/// Skip | ||
/// </summary> | ||
int Skip { get; set; } | ||
|
||
/// <summary> | ||
/// Top | ||
/// </summary> | ||
int Top { get; set; } | ||
|
||
/// <summary> | ||
/// SearchPattern | ||
/// </summary> | ||
string SearchPattern { get; set; } | ||
|
||
/// <summary> | ||
/// Fields | ||
/// </summary> | ||
IList<FieldQuery> Fields { get; set; } | ||
|
||
/// <summary> | ||
/// OrderFields | ||
/// </summary> | ||
IList<FieldOrder> OrderFields { get; set; } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
bool IncludeListFieldsOnly { get; set; } | ||
|
||
/// <summary> | ||
/// UsedAsset | ||
/// </summary> | ||
Guid? UsedAsset { get; set; } | ||
|
||
/// <summary> | ||
/// Published | ||
/// </summary> | ||
bool Published { get; set; } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) usercode | ||
// https://github.com/usercode/DragonFly | ||
// MIT License | ||
|
||
using System.Net.Mime; | ||
using DragonFly.Query; | ||
|
||
namespace DragonFly.Proxy.Query; | ||
|
||
public class ContentQuery<TContentType> : ContentQuery, IContentQuery<TContentType> | ||
{ | ||
public ContentQuery() | ||
{ | ||
Schema = ProxyTypeManager.Default.Get<TContentType>().Name; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/DragonFly.Proxy/Builder/Query/Fields/AssetFieldQueryExtensions.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,22 @@ | ||
// Copyright (c) usercode | ||
// https://github.com/usercode/DragonFly | ||
// MIT License | ||
|
||
using System.Linq.Expressions; | ||
using DragonFly.Proxy.Helpers; | ||
using DragonFly.Query; | ||
|
||
namespace DragonFly.Proxy.Query; | ||
|
||
/// <summary> | ||
/// AssetFieldQueryExtensions | ||
/// </summary> | ||
public static class AssetFieldQueryExtensions | ||
{ | ||
public static IContentQuery<TModel> AddAssetQuery<TModel>(this IContentQuery<TModel> query, Expression<Func<TModel, Asset?>> name, Guid? id) | ||
{ | ||
query.AddAssetQuery(ReflectionHelper.GetPropertyName(name), id); | ||
|
||
return query; | ||
} | ||
} |
Oops, something went wrong.