public static bool HasPreconditionAttribute(this BasePropertyDeclarationSyntax @this, Contract contract, SemanticModel model)
        {
            if (@this == null)
            {
                throw new ArgumentNullException(nameof(@this));
            }
            if (contract == null)
            {
                throw new ArgumentNullException(nameof(contract));
            }
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            var attributeTypeSymbol = contract.AttributeType.GetTypeSymbol(model);

            return([email protected]() &&
                   @this.AllAttributes()
                   .Any(a => model.GetTypeInfo(a).Type.Equals(attributeTypeSymbol)));
        }
        public static IEnumerable <Contract> GetPreconditions(this BasePropertyDeclarationSyntax @this, SemanticModel model, IContractProvider contractProvider)
        {
            if (@this == null)
            {
                throw new ArgumentNullException(nameof(@this));
            }
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }
            if (contractProvider == null)
            {
                throw new ArgumentNullException(nameof(contractProvider));
            }

            var attributeTypeSymbol = typeof(ContractAttribute).GetTypeSymbol(model);

            return(@this.IsReadonly()
                ? Enumerable.Empty <Contract>()
                : @this.AllAttributes()
                   .Where(a => model.GetTypeInfo(a).Type.InheritsFrom(attributeTypeSymbol))
                   .Select(a => contractProvider[a.GetText().ToString().Trim()]));
        }