Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/EFCore.Analyzers/EFCore.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\src\Shared\EFDiagnostics.cs" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/EFCore.Cosmos/EFCore.Cosmos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EFCore\EFCore.csproj" PrivateAssets="contentfiles;build" />
<ProjectReference Include="..\EFCore\EFCore.csproj" />
<ProjectReference Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" ReferenceOutputAssembly="False" OutputItemType="Analyzer" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.InMemory/EFCore.InMemory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EFCore\EFCore.csproj" PrivateAssets="contentfiles;build" />
<ProjectReference Include="..\EFCore\EFCore.csproj" />
<ProjectReference Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" ReferenceOutputAssembly="False" OutputItemType="Analyzer" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Proxies/EFCore.Proxies.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EFCore\EFCore.csproj" PrivateAssets="contentfiles;build" />
<ProjectReference Include="..\EFCore\EFCore.csproj" />
<ProjectReference Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" ReferenceOutputAssembly="False" OutputItemType="Analyzer" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Relational/EFCore.Relational.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EFCore\EFCore.csproj" PrivateAssets="contentfiles;build" />
<ProjectReference Include="..\EFCore\EFCore.csproj" />
<ProjectReference Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" ReferenceOutputAssembly="False" OutputItemType="Analyzer" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/EFCore/ChangeTracking/LocalView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public class LocalView<[DynamicallyAccessedMembers(IEntityType.DynamicallyAccess
IListSource
where TEntity : class
{
#pragma warning disable EF1001
private ObservableBackedBindingList<TEntity>? _bindingList;
#pragma warning restore EF1001
private ObservableCollection<TEntity>? _observable;
private readonly DbContext _context;
private readonly IEntityType _entityType;
Expand Down Expand Up @@ -472,10 +474,12 @@ private void OnCollectionChanged(NotifyCollectionChangedAction action, object it
/// examples.
/// </remarks>
/// <returns>The binding list.</returns>
#pragma warning disable EF1001
[RequiresUnreferencedCode(
"BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")]
public virtual BindingList<TEntity> ToBindingList()
=> _bindingList ??= new ObservableBackedBindingList<TEntity>(ToObservableCollection());
#pragma warning restore EF1001

/// <summary>
/// This method is called by data binding frameworks when attempting to data bind
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore/EFCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Microsoft.EntityFrameworkCore.DbSet

<ItemGroup>
<ProjectReference Include="..\EFCore.Abstractions\EFCore.Abstractions.csproj" />
<ProjectReference Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" PrivateAssets="contentfiles;build" />
<ProjectReference Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" ReferenceOutputAssembly="False" OutputItemType="Analyzer" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/EFCore/Properties/TypeForwards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
using System.Runtime.CompilerServices;
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;

#pragma warning disable EF1001
[assembly: TypeForwardedTo(typeof(ObservableBackedBindingList<>))]
[assembly: TypeForwardedTo(typeof(ObservableCollectionExtensions))]
[assembly: TypeForwardedTo(typeof(ObservableCollectionListSource<>))]
[assembly: TypeForwardedTo(typeof(SortableBindingList<>))]
[assembly: TypeForwardedTo(typeof(DeleteBehavior))]
#pragma warning restore EF1001
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.EntityFrameworkCore;
/// <summary>
/// Contains the IDs of diagnostics emitted by EF Core analyzers, [Experimental] and other mechanisms.
/// </summary>
public static class EFDiagnostics
internal static class EFDiagnostics
{
public const string InternalUsage = "EF1001";
public const string InterpolatedStringUsageInRawQueries = "EF1002";
Expand Down
4 changes: 4 additions & 0 deletions test/EFCore.Analyzers.Tests/EFCore.Analyzers.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\src\Shared\EFDiagnostics.cs" />
</ItemGroup>

</Project>