/// <summary> /// Returns true if signatures match. Looks at types only, not at names. /// </summary> public bool MatchesSignature(DotNetParameter other) { if (TypeName is DotNetReferenceClassGeneric) { return((TypeName as DotNetReferenceClassGeneric).MatchesSignature(other.TypeName)); } else if (TypeName is DotNetReferenceMethodGeneric) { return((TypeName as DotNetReferenceMethodGeneric).MatchesSignature(other.TypeName)); } else { return(TypeName.FullName == other.TypeName.FullName); } }
/// <summary>For equality, parameter type and category must be equal. Parameter name and default value are irrelevant.</summary> public override bool Equals(Object b) { if (!(b is DotNetParameter)) { return(false); } if (object.ReferenceEquals(this, null) && object.ReferenceEquals(b, null)) { return(true); } if (object.ReferenceEquals(this, null) || object.ReferenceEquals(b, null)) { return(false); } DotNetParameter other = (b as DotNetParameter); return(this.TypeName == other.TypeName && this.Category == other.Category); }