Skip to content

Commit

Permalink
Fix code issues popping up in Rider IDE (#7683)
Browse files Browse the repository at this point in the history
  • Loading branch information
3bit authored Nov 22, 2020
1 parent f20c87a commit ff4223e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
12 changes: 12 additions & 0 deletions OrchardCore.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EActionNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EAreaNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EControllerNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EInvalidModelType/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EMasterpageNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EPartialViewNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002ETemplateNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EViewComponentNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EViewComponentViewNotResolved/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=Mvc_002EViewNotResolved/@EntryIndexedValue">WARNING</s:String>
</wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@*Alternate this shape using in Module - like ContentCard-FlowPart.Edit.cshtml *@
@**TODO: Provide default Shape here*@
@*TODO: Provide default Shape here*@
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public GraphQLContentOptions ConfigurePart(string partName, Action<GraphQLConten
return this;
}

public GraphQLContentOptions IgnoreField<IGraphType>(string fieldName) where IGraphType : IObjectGraphType
public GraphQLContentOptions IgnoreField<TGraphType>(string fieldName) where TGraphType : IObjectGraphType
{
HiddenFields = HiddenFields.Union(new[] {
new GraphQLField<IGraphType>(fieldName),
new GraphQLField<TGraphType>(fieldName),
});

return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace OrchardCore.ContentManagement.GraphQL.Options
{
public class GraphQLField<IGraphType> : GraphQLField where IGraphType : IObjectGraphType
public class GraphQLField<TGraphType> : GraphQLField where TGraphType : IObjectGraphType
{
public GraphQLField(string fieldName) : base(typeof(IGraphType), fieldName)
public GraphQLField(string fieldName) : base(typeof(TGraphType), fieldName)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public interface IDocumentStore
{
/// <summary>
/// Loads a single document (or create a new one) for updating and that should not be cached.
/// For a full isolation, it needs to be used in pair with <see cref="GetOrCreateImmutableAsync"/>.
/// For a full isolation, it needs to be used in pair with <see cref="GetOrCreateImmutableAsync{T}"/>.
/// </summary>
Task<T> GetOrCreateMutableAsync<T>(Func<Task<T>> factoryAsync = null) where T : class, new();

/// <summary>
/// Gets a single document (or create a new one) for caching and that should not be updated,
/// and a bool indicating if it can be cached, not if it has been already loaded for update.
/// For a full isolation, it needs to be used in pair with <see cref="GetOrCreateMutableAsync"/>.
/// For a full isolation, it needs to be used in pair with <see cref="GetOrCreateMutableAsync{T}"/>.
/// </summary>
Task<(bool, T)> GetOrCreateImmutableAsync<T>(Func<Task<T>> factoryAsync = null) where T : class, new();

Expand Down
3 changes: 3 additions & 0 deletions test/OrchardCore.Tests/DisplayManagement/ZoneonDemandTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ public void ZoneOnDemandAsBaseTypeIsEqualToItself()
Composite zoneComposite1 = zoneOnDemand, zoneComposite2 = zoneOnDemand;
object zoneObject1 = zoneOnDemand, zoneObject2 = zoneOnDemand;

#pragma warning disable 252,253
// Intended reference comparison
Assert.True(zoneShape1 == zoneShape2);
Assert.True(zoneComposite1 == zoneComposite2);
#pragma warning restore 252,253
Assert.True(zoneObject1 == zoneObject2);
}

Expand Down

0 comments on commit ff4223e

Please sign in to comment.