Esempio n. 1
0
        /// <summary>
        ///     Determines if two function signatures match exactly (including return type), parameter names do not matter but
        ///     parameter types do.
        /// </summary>
        /// <param name="otherSignature">The other function signature to compare to</param>
        /// <returns>True if the two signatures are identical</returns>
        /// <exception cref="ArgumentNullException"><paramref name="otherSignature"/> is <c>null</c>.</exception>
        public bool SignatureEquivalent(ILSLFunctionSignature otherSignature)
        {
            if (otherSignature == null)
            {
                throw new ArgumentNullException("otherSignature");
            }

            return(LSLFunctionSignatureMatcher.SignaturesEquivalent(this, otherSignature));
        }
Esempio n. 2
0
 /// <summary>
 ///     Determines if a given <see cref="LSLFunctionSignature" /> is a duplicate definition of this function signature. <para/>
 ///     The logic behind this is a bit different than SignatureMatches(). <para/>
 ///     If the given function signature has the same name, a differing return type and both functions have no parameters;
 ///     than this function will return true
 ///     and <see cref="ILSLFunctionSignature.SignatureEquivalent" /> will not. <para/>
 ///     If the other signature is an overload that is ambiguous in all cases due to variadic parameters, this function
 ///     returns true.
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="otherSignature">The other function signature to compare to</param>
 /// <returns>
 ///     True if the two signatures are duplicate definitions of each other, taking static overloading ambiguities into
 ///     account.
 /// </returns>
 public bool DefinitionIsDuplicate(ILSLFunctionSignature otherSignature)
 {
     return(LSLFunctionSignatureMatcher.DefinitionIsDuplicate(this, otherSignature));
 }