public bool IsCompatibleWith(BasicSignature other) { return(CallingConvention == other.CallingConvention && ((ParameterTypes == null && other.ParameterTypes == null) || ParameterTypes.SequenceEqual(other.ParameterTypes)) && ReturnType.Equals(other.ReturnType)); }
public override bool NotNullObjectEquals(ClepsType obj) { if (obj.GetType() != typeof(FunctionClepsType)) { return(false); } FunctionClepsType objToCompare = obj as FunctionClepsType; return(ReturnType == objToCompare.ReturnType && ParameterTypes.SequenceEqual(objToCompare.ParameterTypes)); }
public override bool Equals(object obj) { var otherMethod = obj as MethodValidationResult; if (otherMethod == null) { return(false); } if (!otherMethod.MethodName.Equals(MethodName)) { return(false); } return(ParameterTypes.SequenceEqual(otherMethod.ParameterTypes)); }
public override bool Equals(TypeBase other) { if (!base.Equals(other)) { return(false); } var otherFunc = other as FuncType; if (otherFunc == null) { return(false); } return(IsConstant == other.IsConstant && ParameterTypes.SequenceEqual(otherFunc.ParameterTypes) && ReturnType == otherFunc.ReturnType); }
/// <summary> /// Check the equivalence of this object and the argument object. /// </summary> /// <param name="obj">Target object.</param> /// <returns>It returns True if equivalent, False otherwise.</returns> public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } var member = (Member)obj; var boolcollector = new BoolCollector(); boolcollector.ChangeBool("Accessibility", Accessibility == member.Accessibility); boolcollector.ChangeBool("Id", Id.Equals(member.Id)); boolcollector.ChangeBool("Name", Name.Equals(member.Name)); boolcollector.ChangeBool("Namespace", Namespace.Equals(member.Namespace)); boolcollector.ChangeBool("Parameters", ParameterNames.SequenceEqual(member.ParameterNames)); boolcollector.ChangeBool("ParameterTypes", ParameterTypes.SequenceEqual(member.ParameterTypes)); boolcollector.ChangeBool("ReturnComment", ReturnComment.Equals(member.ReturnComment)); boolcollector.ChangeBool("ReturnType", ReturnType.Equals(member.ReturnType)); boolcollector.ChangeBool("Type", Type == member.Type); boolcollector.ChangeBool("Value", Value.Equals(member.Value)); return(boolcollector.Value); }
/// <summary> /// Determines whether or not the current instance has the same signature as another. /// </summary> /// <param name="other">The other method info.</param> /// <returns>true if the signatures are the same; otherwise, false.</returns> public bool HasSameSignatureAs([NotNull] IntrospectiveMethodInfo other) { if (Name != other.Name) { return(false); } if (ReturnType != other.ReturnType) { return(false); } if (ParameterTypes.Count != other.ParameterTypes.Count) { return(false); } if (!ParameterTypes.SequenceEqual(other.ParameterTypes)) { return(false); } return(true); }
public bool Matches(TypeManager typeManager, IMethodDefinition method) { var paramTypes = method.Parameters.Select(p => typeManager.ConvertCCITypeToAssemblyQualifiedName(p.Type)); return(Name.Equals(method.Name.Value) && ParameterTypes.SequenceEqual(paramTypes)); }
public override bool Equals(object obj) { var other = obj as InvocationTarget; return(other != null && TypeName == other.TypeName && MethodName == other.MethodName && ParameterTypes.SequenceEqual(other.ParameterTypes)); }