diff --git a/src/Volo.Abp/Abp/Modularity/AbpModuleDescriptor.cs b/src/Volo.Abp/Abp/Modularity/AbpModuleDescriptor.cs index e1091506d3..9ef71cff84 100644 --- a/src/Volo.Abp/Abp/Modularity/AbpModuleDescriptor.cs +++ b/src/Volo.Abp/Abp/Modularity/AbpModuleDescriptor.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using JetBrains.Annotations; +using Volo.CodeAnnotations; namespace Volo.Abp.Modularity { diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/CanBeNullAttribute.cs b/src/Volo.CodeAnnotations/CodeAnnotations/CanBeNullAttribute.cs deleted file mode 100644 index ab06a172a9..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/CanBeNullAttribute.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [AttributeUsage( - AttributeTargets.Method | AttributeTargets.Parameter | - AttributeTargets.Property | AttributeTargets.Delegate | - AttributeTargets.Field)] - public sealed class CanBeNullAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/Check.cs b/src/Volo.CodeAnnotations/CodeAnnotations/Check.cs index ac110bfbb6..c27eae9bcc 100644 --- a/src/Volo.CodeAnnotations/CodeAnnotations/Check.cs +++ b/src/Volo.CodeAnnotations/CodeAnnotations/Check.cs @@ -1,8 +1,11 @@ using System; using System.Diagnostics; +using JetBrains.Annotations; -namespace JetBrains.Annotations +namespace Volo.CodeAnnotations { + //TODO: Remove this library and move Check to somewhere else! + [DebuggerStepThrough] public static class Check { diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/ContractAnnotationAttribute.cs b/src/Volo.CodeAnnotations/CodeAnnotations/ContractAnnotationAttribute.cs deleted file mode 100644 index b79e23e6e2..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/ContractAnnotationAttribute.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - public sealed class ContractAnnotationAttribute : Attribute - { - public string Contract { get; private set; } - - public bool ForceFullStates { get; private set; } - - public ContractAnnotationAttribute([NotNull] string contract) - : this(contract, false) - { - } - - public ContractAnnotationAttribute([NotNull] string contract, bool forceFullStates) - { - Contract = contract; - ForceFullStates = forceFullStates; - } - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/ImplicitUseKindFlags.cs b/src/Volo.CodeAnnotations/CodeAnnotations/ImplicitUseKindFlags.cs deleted file mode 100644 index d8d51e73f0..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/ImplicitUseKindFlags.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [Flags] - public enum ImplicitUseKindFlags - { - Default = Access | Assign | InstantiatedWithFixedConstructorSignature, - Access = 1, - Assign = 2, - InstantiatedWithFixedConstructorSignature = 4, - InstantiatedNoFixedConstructorSignature = 8 - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/ImplicitUseTargetFlags.cs b/src/Volo.CodeAnnotations/CodeAnnotations/ImplicitUseTargetFlags.cs deleted file mode 100644 index 7771131c04..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/ImplicitUseTargetFlags.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [Flags] - public enum ImplicitUseTargetFlags - { - Default = Itself, - Itself = 1, - Members = 2, - WithMembers = Itself | Members - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/InvokerParameterNameAttribute.cs b/src/Volo.CodeAnnotations/CodeAnnotations/InvokerParameterNameAttribute.cs deleted file mode 100644 index 028bd4fe45..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/InvokerParameterNameAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [AttributeUsage(AttributeTargets.Parameter)] - public sealed class InvokerParameterNameAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/NoEnumerationAttribute.cs b/src/Volo.CodeAnnotations/CodeAnnotations/NoEnumerationAttribute.cs deleted file mode 100644 index 260c062581..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/NoEnumerationAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [AttributeUsage(AttributeTargets.Parameter)] - internal sealed class NoEnumerationAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/NotNullAttribute.cs b/src/Volo.CodeAnnotations/CodeAnnotations/NotNullAttribute.cs deleted file mode 100644 index 493e4cb0cf..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/NotNullAttribute.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [AttributeUsage( - AttributeTargets.Method | AttributeTargets.Parameter | - AttributeTargets.Property | AttributeTargets.Delegate | - AttributeTargets.Field)] - public sealed class NotNullAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/StringFormatMethodAttribute.cs b/src/Volo.CodeAnnotations/CodeAnnotations/StringFormatMethodAttribute.cs deleted file mode 100644 index 33821b14c8..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/StringFormatMethodAttribute.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Delegate)] - public sealed class StringFormatMethodAttribute : Attribute - { - public StringFormatMethodAttribute([NotNull] string formatParameterName) - { - FormatParameterName = formatParameterName; - } - - [NotNull] - public string FormatParameterName { get; private set; } - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/CodeAnnotations/UsedImplicitlyAttribute.cs b/src/Volo.CodeAnnotations/CodeAnnotations/UsedImplicitlyAttribute.cs deleted file mode 100644 index e230c9e336..0000000000 --- a/src/Volo.CodeAnnotations/CodeAnnotations/UsedImplicitlyAttribute.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; - -namespace JetBrains.Annotations -{ - [AttributeUsage(AttributeTargets.All)] - public sealed class UsedImplicitlyAttribute : Attribute - { - public UsedImplicitlyAttribute() - : this(ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default) - { - } - - public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags) - : this(useKindFlags, ImplicitUseTargetFlags.Default) - { - } - - public UsedImplicitlyAttribute(ImplicitUseTargetFlags targetFlags) - : this(ImplicitUseKindFlags.Default, targetFlags) - { - } - - public UsedImplicitlyAttribute( - ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags) - { - UseKindFlags = useKindFlags; - TargetFlags = targetFlags; - } - - public ImplicitUseKindFlags UseKindFlags { get; private set; } - - public ImplicitUseTargetFlags TargetFlags { get; private set; } - } -} \ No newline at end of file diff --git a/src/Volo.CodeAnnotations/project.json b/src/Volo.CodeAnnotations/project.json index 8930967524..65a8e28a9d 100644 --- a/src/Volo.CodeAnnotations/project.json +++ b/src/Volo.CodeAnnotations/project.json @@ -1,7 +1,8 @@ -{ +{ "version": "1.0.0-*", "dependencies": { + "JetBrains.Annotations": "10.2.1", "NETStandard.Library": "1.6.1" }, diff --git a/src/Volo.ExtensionMethods/Collections/Generic/CollectionExtensions.cs b/src/Volo.ExtensionMethods/Collections/Generic/CollectionExtensions.cs index 715ec70903..a2e64aad9a 100644 --- a/src/Volo.ExtensionMethods/Collections/Generic/CollectionExtensions.cs +++ b/src/Volo.ExtensionMethods/Collections/Generic/CollectionExtensions.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using JetBrains.Annotations; +using Volo.CodeAnnotations; namespace Volo.Collections.Generic {