Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSHARP-4886: Mark API that will be removed in 3.0 as obsolete: MongoDB.Bson #1243

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="$(PackageLicenseFile)" />
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
</ItemGroup>

<PropertyGroup>
<NoWarn>
CS0618 <!--Temporary disable obsolete warnings due the massive volume of warnings-->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sign that these changes will be painful for our users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but less painful than just API removal without prior warning. Which is the intention of these obsoletions PRs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have a goal that users who stay on 2.x don't have to deal with these warnings at all.

</NoWarn>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions src/MongoDB.Bson/BsonDefaults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace MongoDB.Bson
/// <summary>
/// A static helper class containing BSON defaults.
/// </summary>
[Obsolete("This class will be removed in later release.")]
public static class BsonDefaults
{
// private static fields
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/BsonBinaryReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public BsonBinaryReaderSettings()
/// <summary>
/// Gets or sets the default settings for a BsonBinaryReader.
/// </summary>
[Obsolete("This property will be removed in later release.")]
public static BsonBinaryReaderSettings Defaults
{
get
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/BsonBinaryWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public BsonBinaryWriterSettings()
/// <summary>
/// Gets or sets the default BsonBinaryWriter settings.
/// </summary>
[Obsolete("This property will be removed in later release.")]
public static BsonBinaryWriterSettings Defaults
{
get
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/BsonDocumentReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public BsonDocumentReaderSettings(GuidRepresentation guidRepresentation)
/// <summary>
/// Gets or sets the default settings for a BsonDocumentReader.
/// </summary>
[Obsolete("This property will be removed in later release.")]
public static BsonDocumentReaderSettings Defaults
{
get
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/BsonDocumentWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public BsonDocumentWriterSettings(GuidRepresentation guidRepresentation)
/// <summary>
/// Gets or sets the default BsonDocumentWriter settings.
/// </summary>
[Obsolete("This property will be removed in later release.")]
public static BsonDocumentWriterSettings Defaults
{
get
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/BsonTrie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace MongoDB.Bson.IO
/// Represents a mapping from a set of UTF8 encoded strings to a set of elementName/value pairs, implemented as a trie.
/// </summary>
/// <typeparam name="TValue">The type of the BsonTrie values.</typeparam>
[Obsolete("This class will be removed in later release.")]
public class BsonTrie<TValue>
{
// private fields
Expand Down
1 change: 0 additions & 1 deletion src/MongoDB.Bson/IO/BsonWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ protected string Name
get { return _name; }
}

// public static methods
// public methods
/// <summary>
/// Closes the writer.
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/ByteArrayChunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents a chunk backed by a byte array.
/// </summary>
[Obsolete("This class will be removed in later release.")]
public class ByteArrayChunk : IBsonChunk
{
#region static
Expand Down
2 changes: 2 additions & 0 deletions src/MongoDB.Bson/IO/ByteBufferFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents a factory for IBsonBuffers.
/// </summary>
/// ByteBufferFactory
[Obsolete("This class will be removed in later release.")]
public static class ByteBufferFactory
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/ByteBufferSlice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents a slice of a byte buffer.
/// </summary>
[Obsolete("This class will be removed in later release.")]
public class ByteBufferSlice : IByteBuffer
{
private readonly IByteBuffer _buffer;
Expand Down
2 changes: 2 additions & 0 deletions src/MongoDB.Bson/IO/IStreamEfficientCopyTo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
* limitations under the License.
*/

using System;
using System.IO;

namespace MongoDB.Bson.IO
{
/// <summary>
/// Represents the effective CopyTo method.
/// </summary>
[Obsolete("This interface will be removed in later release.")]
public interface IStreamEfficientCopyTo
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/JsonReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public JsonReaderSettings()
/// <summary>
/// Gets or sets the default settings for a JsonReader.
/// </summary>
[Obsolete("This property will be removed in later release.")]
public static JsonReaderSettings Defaults
{
get
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/IO/JsonWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public JsonWriterSettings()
/// <summary>
/// Gets or sets the default JsonWriterSettings.
/// </summary>
[Obsolete("This property will be removed in later release.")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention is also to remove all the static defaults and settings related to serialization.
We don't have new builders and configuration API defined yet, and for some time they will co-exist, but it's better to start obsoleting them as early as possible.

public static JsonWriterSettings Defaults
{
get
Expand Down
2 changes: 2 additions & 0 deletions src/MongoDB.Bson/IO/TrieNameDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* limitations under the License.
*/

using System;
using System.Text;

namespace MongoDB.Bson.IO
Expand All @@ -21,6 +22,7 @@ namespace MongoDB.Bson.IO
/// Represents a Trie-based name decoder that also provides a value.
/// </summary>
/// <typeparam name="TValue">The type of the value.</typeparam>
[Obsolete("This class will be removed in later release.")]
public class TrieNameDecoder<TValue> : INameDecoder
{
// private fields
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/ObjectModel/BsonSymbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON symbol value.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being deprecated? What if a document in the database contains this type of BSON value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Symbol was deprecated in 1.7.
I am not sure that we should remove this, but we do need to inform users that those classes are not expected to be used. I've changed the comment and added it for the related classes missed before.

public class BsonSymbol : BsonValue, IComparable<BsonSymbol>, IEquatable<BsonSymbol>
{
// private fields
Expand Down
6 changes: 6 additions & 0 deletions src/MongoDB.Bson/ObjectModel/BsonType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ public enum BsonType
/// BSON binary data.
/// </summary>
Binary = 0x05,

/// <summary>
/// A BSON undefined value.
/// </summary>
[Obsolete("Undefined type is depricated and will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being deprecated? What if a document in the database contains this type of BSON value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's depreciated, so users should be informed not to use it accidently.

Undefined = 0x06,

/// <summary>
/// A BSON ObjectId.
/// </summary>
Expand All @@ -75,10 +78,13 @@ public enum BsonType
/// BSON JavaScript code.
/// </summary>
JavaScript = 0x0d,

/// <summary>
/// A BSON symbol.
/// </summary>
[Obsolete("Symbol type is depricated and will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being deprecated? What if a document in the database contains this type of BSON value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's depreciated, so users should be informed not to use it accidently.

Symbol = 0x0e,

/// <summary>
/// BSON JavaScript code with a scope (a set of variables with values).
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public static void RegisterCustomTypeMapper(Type type, ICustomBsonTypeMapper cus
/// </summary>
/// <param name="value">An object.</param>
/// <param name="bsonValue">The BsonValue.</param>
/// <returns>True if the mapping was successfull.</returns>
/// <returns>True if the mapping was successful.</returns>
public static bool TryMapToBsonValue(object value, out BsonValue bsonValue)
{
if (value == null)
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/ObjectModel/BsonTypeMapperOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public BsonTypeMapperOptions()
/// <summary>
/// Gets or sets the default BsonTypeMapperOptions.
/// </summary>
[Obsolete("This property will be removed in later release.")]
public static BsonTypeMapperOptions Defaults
{
get { return __defaults; }
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/ICustomBsonTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface ICustomBsonTypeMapper
/// </summary>
/// <param name="value">An object.</param>
/// <param name="bsonValue">The BsonValue.</param>
/// <returns>True if the mapping was successfull.</returns>
/// <returns>True if the mapping was successful.</returns>
bool TryMapToBsonValue(object value, out BsonValue bsonValue);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// Provides serializers based on an attribute.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need it as a pubic class?

public class AttributedSerializationProvider : BsonSerializationProviderBase
{
/// <inheritdoc/>
Expand Down
1 change: 1 addition & 0 deletions src/MongoDB.Bson/Serialization/BsonClassMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ public static bool IsClassMapRegistered(Type type)
/// </summary>
/// <param name="classType">The class type.</param>
/// <returns>The class map.</returns>
[Obsolete("This method will be removed in later release.")]
public static BsonClassMap LookupClassMap(Type classType)
{
if (classType == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// Provides serializers for BsonValue and its derivations.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need it as a pubic class?

public class BsonObjectModelSerializationProvider : BsonSerializationProviderBase
{
private static readonly Dictionary<Type, IBsonSerializer> __serializers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// Provides serializers for collections.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need it as a pubic class (and other providers)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users can write custom serialization providers and in general configure any mix of serialization providers in any order. To do so the providers need to be public.

Removing these classes (or making them internal) removes a feature.

public class CollectionsSerializationProvider : BsonSerializationProviderBase
{
private static readonly Dictionary<Type, Type> __serializerTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace MongoDB.Bson.Serialization.Conventions
{
/// <summary>
/// A convention that finds readable and writeable members and adds them to the class map.
/// A convention that finds readable and writable members and adds them to the class map.
/// </summary>
public class ReadWriteMemberFinderConvention : ConventionBase, IClassMapConvention
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// A helper class used to create and compile delegates for creator maps.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need it as public class, and not as internal static utility?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought when you said "removed" you meant "removed".

It probably can be made internal.

public class CreatorMapDelegateCompiler : ExpressionVisitor
{
// private fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// Provides a serializer for interfaces.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need providers to be public?

public class DiscriminatedInterfaceSerializationProvider : BsonSerializationProviderBase
{
/// <inheritdoc/>
Expand Down
3 changes: 2 additions & 1 deletion src/MongoDB.Bson/Serialization/ExpressionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// An abstract base class for an Expression visitor.
/// </summary>
[Obsolete("This class will be removed in later release.")]
public abstract class ExpressionVisitor
{
// constructors
Expand All @@ -41,7 +42,7 @@ protected ExpressionVisitor()
/// Visits an Expression.
/// </summary>
/// <param name="node">The Expression.</param>
/// <returns>The Expression (posibly modified).</returns>
/// <returns>The Expression (possibly modified).</returns>
protected virtual Expression Visit(Expression node)
{
if (node == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ public interface IBsonSerializationProvider
/// An interface implemented by serialization providers that are aware of registries.
/// </summary>
/// <remarks>
/// This interface was added to preserve backward compatability (changing IBsonSerializationProvider would have been a backward breaking change).
/// This interface was added to preserve backward compatibility (changing IBsonSerializationProvider would have been a backward breaking change).
/// </remarks>
[Obsolete("This interface will be merged with IBsonSerializationProvider interface in later release.")]
public interface IRegistryAwareBsonSerializationProvider : IBsonSerializationProvider
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,22 @@ public static BsonBinaryDataGuidGenerator StandardInstance
}

/// <summary>
/// Gets an instance of BsonBinaryDataGuidGenerator for Unspecifed GuidRepresentation.
/// Gets an instance of BsonBinaryDataGuidGenerator for Unspecified GuidRepresentation.
/// </summary>
[Obsolete("This method will be removed in later release. Please use UnspecifiedInstance instead")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, directing to use UnspecifiedInstance instead.

public static BsonBinaryDataGuidGenerator UnspecifedInstance
{
get { return __unspecifiedInstance; }
}

/// <summary>
/// Gets an instance of BsonBinaryDataGuidGenerator for Unspecified GuidRepresentation.
/// </summary>
public static BsonBinaryDataGuidGenerator UnspecifiedInstance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this duplicate the property of the same name on line 84?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fixing a typo.

{
get { return __unspecifiedInstance; }
}

// public properties
/// <summary>
/// Gets the Guid representation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace MongoDB.Bson.Serialization.IdGenerators
/// </summary>
/// <typeparam name="T">The type of the Id.</typeparam>
// TODO: is it worth trying to remove the dependency on IEquatable<T>?
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.

public class ZeroIdChecker<T> : IIdGenerator where T : struct, IEquatable<T>
{
// constructors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// Provides serializers for primitive types.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will our user be needing our built-in serializer providers?

public class PrimitiveSerializationProvider : BsonSerializationProviderBase
{
private static readonly Dictionary<Type, Type> __serializersTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace MongoDB.Bson.Serialization.Serializers
/// <summary>
/// Represents a helper for serializers.
/// </summary>
[Obsolete("This class will be removed in later release.")]
public class SerializerHelper
{
// private fields
Expand Down Expand Up @@ -138,6 +139,7 @@ private Member FindFirstMissingRequiredMember(long missingRequiredMemberFlags)
/// <summary>
/// Represents information about a member.
/// </summary>
[Obsolete("This class will be removed in later release.")]
public class Member
{
// private static fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace MongoDB.Bson.Serialization.Serializers
public interface IBsonTupleSerializer
{
/// <summary>
/// Gets ths serializer for an item.
/// Gets this serializer for an item.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// Gets the serializer for an item.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

/// </summary>
/// <param name="itemNumber">The item number.</param>
/// <returns>The serializer for the item.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace MongoDB.Bson.Serialization
/// <summary>
/// Represents a serialization provider based on a mapping from value types to serializer types.
/// </summary>
[Obsolete("This class will be removed in later release.")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?

public sealed class TypeMappingSerializationProvider : BsonSerializationProviderBase
{
// private fields
Expand Down
5 changes: 4 additions & 1 deletion src/MongoDB.Driver.Core/MongoDB.Driver.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
</PropertyGroup>

<PropertyGroup>
<NoWarn>NU5100</NoWarn>
<NoWarn>
NU5100;
CS0618 <!--Temporary disable obsolete warnings due the massive volume of warnings-->
</NoWarn>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sign that these changes will be painful for our users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But hopefully significantly less painful than just removing API in 3.0 without prior warning.

</PropertyGroup>

<ItemGroup>
Expand Down
21 changes: 21 additions & 0 deletions tests/BuildProps/Tests.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,25 @@
</PackageReference>
</ItemGroup>

<PropertyGroup>
<NoWarn>
1701;1702; <!--https://github.com/dotnet/roslyn/issues/19640-->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed more efficient to define all warnings suppressions in single place for tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sign that these changes will be painful for our users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But hopefully significantly less painful than just removing API in 3.0 without prior warning.

CS0618; <!--Temporary disable obsolete warnings due the massive volume of warnings-->
xUnit1010; <!--The value is not convertible to the method parameter type (https://xunit.github.io/xunit.analyzers/rules/xUnit1010.html)-->
xUnit1013; <!--Public method should be marked as test (https://xunit.github.io/xunit.analyzers/rules/xUnit1013.html)-->
xUnit1016; <!--MemberData must reference a public member (https://xunit.github.io/xunit.analyzers/rules/xUnit1016.html)-->
xUnit1024; <!--Test methods cannot have overloads (https://xunit.github.io/xunit.analyzers/rules/xUnit1024.html)-->
xUnit1025; <!--InlineData should be unique within the Theory it belongs to (https://xunit.github.io/xunit.analyzers/rules/xUnit1025.html)-->
xUnit1026; <!--Theory methods should use all of their parameters (https://xunit.github.io/xunit.analyzers/rules/xUnit1026.html)-->
xUnit2000; <!--Constants and literals should be the expected argument (https://xunit.github.io/xunit.analyzers/rules/xUnit2000.html-->
xUnit2003; <!--Do not use equality check to test for null value (https://xunit.github.io/xunit.analyzers/rules/xUnit2003.html-->
xUnit2004; <!--Do not use equality check to test for boolean conditions (https://xunit.github.io/xunit.analyzers/rules/xUnit2004.html)-->
xUnit2005; <!--Do not use identity check on value type (https://xunit.github.io/xunit.analyzers/rules/xUnit205.html-->
xUnit2009; <!--Do not use boolean check to check for substrings (https://xunit.github.io/xunit.analyzers/rules/xUnit2009.html)-->
xUnit2012; <!--Do not use Enumerable.Any() to check if a value exists in a collection (https://xunit.github.io/xunit.analyzers/rules/xUnit2012.html)-->
xUnit2013; <!--Do not use equality check to check for collection size. (https://xunit.github.io/xunit.analyzers/rules/xUnit2013.html)-->
xUnit2015; <!--Do not use typeof expression to check the exception type (https://xunit.github.io/xunit.analyzers/rules/xUnit2015.html)-->
xUnit2017; <!--Do not use Contains() to check if a value exists in a collection (https://xunit.github.io/xunit.analyzers/rules/xUnit2017.html)-->
</NoWarn>
</PropertyGroup>
</Project>