public bool Equals(TypeReferenceDependency other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(Target, other.Target) && Equals(Origin, other.Origin)); }
private void AddAttributeArgumentReferenceDependenciesToOriginType(ICustomAttribute customAttribute) { if (!customAttribute.HasConstructorArguments) { return; } var attributeConstructorArgs = customAttribute.ConstructorArguments; attributeConstructorArgs .Where(attributeArgument => attributeArgument.Value is TypeReference) .Select(attributeArgument => (typeReference: attributeArgument.Value as TypeReference, attributeArgument)) .ForEach(tuple => { var argumentType = _typeFactory.GetOrCreateStubTypeFromTypeReference(tuple.typeReference); var dependency = new TypeReferenceDependency(_type, argumentType); _type.Dependencies.Add(dependency); }); }