Skip to content

Commit

Permalink
silly formating
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Nov 26, 2024
1 parent 3c0d96b commit a8e1202
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public class ContentFieldsProvider : IContentFieldProvider
}
}.ToFrozenDictionary();

protected readonly IStringLocalizer<ContentFieldsProvider> S;
protected readonly IStringLocalizer S;

public ContentFieldsProvider(IStringLocalizer<ContentFieldsProvider> stringLocalizer)
{
Expand Down Expand Up @@ -169,7 +169,7 @@ public bool HasFieldIndex(ContentPartFieldDefinition field)

private sealed class FieldTypeDescriptor
{
public Func<IStringLocalizer<ContentFieldsProvider>, string> Description { get; set; }
public Func<IStringLocalizer, string> Description { get; set; }

public Type FieldType { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ public LinkFieldQueryObjectType(IStringLocalizer<LinkFieldQueryObjectType> S)
{
Name = nameof(LinkField);

Field(x => x.Url, nullable: true).Description(S["the url of the link"]);
Field(x => x.Text, nullable: true).Description(S["the text of the link"]);
Field(x => x.Target, nullable: true).Description(S["the target of the link"]);
Field(x => x.Url, nullable: true)
.Description(S["the url of the link"]);

Field(x => x.Text, nullable: true)
.Description(S["the text of the link"]);

Field(x => x.Target, nullable: true)
.Description(S["the target of the link"]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ public CultureQueryObjectType(IStringLocalizer<CultureQueryObjectType> S)
{
Name = "SiteCulture";

Field<StringGraphType>("culture").Description(S["The culture code."]).Resolve(context => context.Source.Culture);
Field<BooleanGraphType>("default").Description(S["Whether this is the default culture."]).Resolve(context => context.Source.IsDefault);
Field<StringGraphType>("culture")
.Description(S["The culture code."])
.Resolve(context => context.Source.Culture);

Field<BooleanGraphType>("default")
.Description(S["Whether this is the default culture."])
.Resolve(context => context.Source.IsDefault);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,21 @@ public sealed class MediaFileItemType : ObjectGraphType<MediaFileItem>
{
public MediaFileItemType(IStringLocalizer<MediaFileItemType> S)
{
Field<StringGraphType>("fileName").Description(S["the file name of the media file item"]).Resolve(x => x.Source.FileName);
Field<StringGraphType>("path").Description(S["the path of the media file item"]).Resolve(x => x.Source.Path);
Field<StringGraphType>("url").Description(S["the url name of the media file item"]).Resolve(x => x.Source.Url);
Field<StringGraphType>("mediaText").Description(S["the media text of the file item"]).Resolve(x => x.Source.MediaText);
Field<StringGraphType>("fileName")
.Description(S["the file name of the media file item"])
.Resolve(x => x.Source.FileName);

Field<StringGraphType>("path")
.Description(S["the path of the media file item"])
.Resolve(x => x.Source.Path);

Field<StringGraphType>("url")
.Description(S["the url name of the media file item"])
.Resolve(x => x.Source.Url);

Field<StringGraphType>("mediaText")
.Description(S["the media text of the file item"])
.Resolve(x => x.Source.MediaText);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ public MetaEntryQueryObjectType(IStringLocalizer<MetaEntryQueryObjectType> S)

Field(x => x.Name)
.Description(S["Name of the meta entry"]);

Field(x => x.Property)
.Description(S["Property of the meta entry"]);

Field(x => x.Content)
.Description(S["Content of the meta entry"]);

Field(x => x.HttpEquiv)
.Description(S["HttpEquiv of the meta entry"]);

Field(x => x.Charset)
.Description(S["Charset of the meta entry"]);

Field<StringGraphType>("Tag")
.Description(S["The generated tag of the meta entry"])
.Resolve(ctx =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ public SeoMetaQueryObjectType(IStringLocalizer<SeoMetaQueryObjectType> S)

Field(x => x.Render)
.Description(S["Whether to render the seo metas"]);

Field(x => x.PageTitle, true)
.Description(S["The seo page title"]);

Field(x => x.MetaDescription, true)
.Description(S["The meta description of the content item"]);

Field(x => x.MetaKeywords, true)
.Description(S["The meta keywords of the content item"]);

Field(x => x.Canonical, true)
.Description(S["The canonical link of the content item"]);

Field(x => x.MetaRobots, true)
.Description(S["The content item specific meta robots definition"]);

Expand All @@ -36,8 +41,10 @@ public SeoMetaQueryObjectType(IStringLocalizer<SeoMetaQueryObjectType> S)

Field(x => x.OpenGraphType, true)
.Description(S["The seo meta opengraph type"]);

Field(x => x.OpenGraphTitle, true)
.Description(S["The seo meta opengraph title"]);

Field(x => x.OpenGraphDescription, true)
.Description(S["The seo meta opengraph description"]);

Expand All @@ -46,17 +53,20 @@ public SeoMetaQueryObjectType(IStringLocalizer<SeoMetaQueryObjectType> S)

Field(x => x.TwitterTitle, true)
.Description(S["The seo meta twitter title"]);

Field(x => x.TwitterDescription, true)
.Description(S["The seo meta twitter description"]);

Field(x => x.TwitterCard, true)
.Description(S["The seo meta twitter card"]);

Field(x => x.TwitterCreator, true)
.Description(S["The seo meta twitter creator"]);

Field(x => x.TwitterSite, true)
.Description(S["The seo meta twitter site"]);

Field(x => x.GoogleSchema, true)
.Description(S["The seo meta google schema"]);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public ContentItemWhereInput(string contentItemName, IOptions<GraphQLContentOpti
var whereInputType = new ListGraphType(this);

Field<ListGraphType<ContentItemWhereInput>>("Or")
.Description(S["OR logical operation"]).Type(whereInputType);
.Description(S["OR logical operation"])
.Type(whereInputType);

Field<ListGraphType<ContentItemWhereInput>>("And")
.Description(S["AND logical operation"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public DynamicContentTypeWhereInputBuilder(
IHttpContextAccessor httpContextAccessor,
IOptions<GraphQLContentOptions> contentOptionsAccessor,
IStringLocalizer<DynamicContentTypeWhereInputBuilder> stringLocalizer)
: base(httpContextAccessor, contentOptionsAccessor, stringLocalizer) { }
: base(httpContextAccessor, contentOptionsAccessor, stringLocalizer)

Check failure on line 16 in src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/DynamicContentTypeWhereInputBuilder.cs

View workflow job for this annotation

GitHub Actions / Build & Test (windows-latest)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 16 in src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/DynamicContentTypeWhereInputBuilder.cs

View workflow job for this annotation

GitHub Actions / Build & Test (windows-latest)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
{ }

public override void Build(ISchema schema, FieldType contentQuery, ContentTypeDefinition contentTypeDefinition, ContentItemType contentItemType)
{
Expand Down

0 comments on commit a8e1202

Please sign in to comment.