public static OperatorContractInfo TryCreate(
            [NotNull] IOperatorDeclaration declaration,
            TreeTextRange selectedTreeRange,
            [NotNull] Func <IType, bool> isAvailableForType)
        {
            if (declaration.GetNameRange().Contains(selectedTreeRange) && declaration.ArrowClause == null)
            {
                var operatorElement = declaration.DeclaredElement;

                Debug.Assert(operatorElement != null);

                if (CanAcceptContracts(operatorElement) && isAvailableForType(operatorElement.ReturnType))
                {
                    return(new OperatorContractInfo(declaration, operatorElement.ReturnType));
                }
            }

            return(null);
        }
 OperatorContractInfo([NotNull] IOperatorDeclaration declaration, [NotNull] IType type) : base(ContractKind.Ensures, type)
     => this.declaration = declaration;
 OperatorContractInfo([NotNull] IOperatorDeclaration declaration, [NotNull] IType type) : base(ContractKind.Ensures, type)
 {
     this.declaration = declaration;
 }