Example #1
0
 /// <summary>
 /// Returns the C# <see cref="MemberInfo"/> for a <see cref="InterLinqMemberInfo"/>.
 /// </summary>
 /// <typeparam name="T"><see cref="Type"/> of the requested <see cref="MemberInfo"/></typeparam>
 /// <param name="memberInfo"><see cref="InterLinqMemberInfo"/>.</param>
 /// <returns>Returns the C# <see cref="MemberInfo"/> for a <see cref="InterLinqMemberInfo"/>.</returns>
 public T GetClrVersion <T>(InterLinqMemberInfo memberInfo) where T : MemberInfo
 {
     if (memberInfo == null)
     {
         return(null);
     }
     return((T)_interLinqTypeMap[memberInfo]);
 }
Example #2
0
        /// <summary>
        /// Compares <paramref name="obj"/> to this instance.
        /// </summary>
        /// <param name="obj"><see langword="object"/> to compare.</param>
        /// <returns>True if equal, false if not.</returns>
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            InterLinqMemberInfo other = (InterLinqMemberInfo)obj;

            return(MemberType == other.MemberType && Name == other.Name && DeclaringType.Equals(other.DeclaringType));
        }
Example #3
0
 /// <summary>
 /// Stores the <see cref="InterLinqMemberInfo"/>-<see cref="MemberInfo"/>
 /// mapping locally.
 /// </summary>
 /// <param name="memberInfo"><see cref="InterLinqMemberInfo"/>.</param>
 /// <param name="clrMeberInfo"><see cref="MemberInfo"/>.</param>
 public void SetClrVersion(InterLinqMemberInfo memberInfo, MemberInfo clrMeberInfo)
 {
     _interLinqTypeMap.Add(memberInfo, clrMeberInfo);
 }
Example #4
0
 /// <summary>
 /// Returns true if the <see cref="InterLinqMemberInfo"/> was already constructed.
 /// </summary>
 /// <param name="memberInfo"><see cref="InterLinqMemberInfo"/>.</param>
 /// <returns>Returns true if the <see cref="InterLinqMemberInfo"/> was already constructed.</returns>
 public bool IsInterLinqMemberInfoRegistered(InterLinqMemberInfo memberInfo)
 {
     return(memberInfo == null || _interLinqTypeMap.ContainsKey(memberInfo));
 }