/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); PropertyInfo propertyInfo = memberInfo as PropertyInfo; PropertyType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(propertyInfo.PropertyType); }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); FieldInfo fieldInfo = memberInfo as FieldInfo; FieldType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(fieldInfo.FieldType); }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> public virtual void Initialize(MemberInfo memberInfo) { Name = memberInfo.Name; #if !NETFX_CORE DeclaringType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(memberInfo.DeclaringType); #else DeclaringType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(memberInfo.DeclaringType.GetTypeInfo()); #endif }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); FieldInfo fieldInfo = memberInfo as FieldInfo; // ReSharper disable PossibleNullReferenceException FieldType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(fieldInfo.FieldType); // ReSharper restore PossibleNullReferenceException }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> public virtual void Initialize(MemberInfo memberInfo) { Name = memberInfo.Name; #if !NETFX_CORE DeclaringType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(memberInfo.DeclaringType); #else DeclaringType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(memberInfo.DeclaringType.GetTypeInfo()); #endif }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); PropertyInfo propertyInfo = memberInfo as PropertyInfo; // ReSharper disable PossibleNullReferenceException PropertyType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(propertyInfo.PropertyType); // ReSharper restore PossibleNullReferenceException }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); FieldInfo fieldInfo = memberInfo as FieldInfo; #if !NETFX_CORE FieldType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(fieldInfo.FieldType); #else FieldType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(fieldInfo.FieldType.GetTypeInfo()); #endif }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); PropertyInfo propertyInfo = memberInfo as PropertyInfo; #if !NETFX_CORE PropertyType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(propertyInfo.PropertyType); #else PropertyType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(propertyInfo.PropertyType.GetTypeInfo()); #endif }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); PropertyInfo propertyInfo = memberInfo as PropertyInfo; #if !NETFX_CORE PropertyType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(propertyInfo.PropertyType); #else PropertyType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(propertyInfo.PropertyType.GetTypeInfo()); #endif }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); FieldInfo fieldInfo = memberInfo as FieldInfo; #if !NETFX_CORE FieldType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(fieldInfo.FieldType); #else FieldType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(fieldInfo.FieldType.GetTypeInfo()); #endif }
/// <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); } InterLinqType other = (InterLinqType)obj; if (GenericArguments.Count != other.GenericArguments.Count) { return(false); } if (GenericArguments.Where((t, i) => !t.Equals(other.GenericArguments[i])).Any()) { return(false); } return(MemberType == other.MemberType && _representedType == other._representedType && Name == other.Name && IsGeneric == other.IsGeneric); }
/// <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); } InterLinqType other = (InterLinqType)obj; if (GenericArguments.Count != other.GenericArguments.Count) { return(false); } for (int i = 0; i < GenericArguments.Count; i++) { if (!GenericArguments[i].Equals(other.GenericArguments[i])) { return(false); } } return(MemberType == other.MemberType && representedType == other.representedType && Name == other.Name && IsGeneric == other.IsGeneric); }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> public virtual void Initialize(MemberInfo memberInfo) { Name = memberInfo.Name; DeclaringType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(memberInfo.DeclaringType); }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); MethodInfo methodInfo = memberInfo as MethodInfo; ReturnType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(methodInfo.ReturnType); if (methodInfo.IsGenericMethod) { foreach (Type genericArgument in methodInfo.GetGenericArguments()) { GenericArguments.Add(InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(genericArgument)); } } }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> public virtual void Initialize(MemberInfo memberInfo) { Name = memberInfo.Name; DeclaringType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf <InterLinqType>(memberInfo.DeclaringType); }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); FieldInfo fieldInfo = memberInfo as FieldInfo; FieldType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(fieldInfo.FieldType); }
/// <summary> /// Initializes this class. /// </summary> /// <param name="memberInfo">Represented <see cref="MemberInfo"/></param> /// <seealso cref="InterLinqMemberInfo.Initialize"/> public override void Initialize(MemberInfo memberInfo) { base.Initialize(memberInfo); PropertyInfo propertyInfo = memberInfo as PropertyInfo; PropertyType = InterLinqTypeSystem.Instance.GetInterLinqVersionOf<InterLinqType>(propertyInfo.PropertyType); }