コード例 #1
0
ファイル: InterLinqPropertyInfo.cs プロジェクト: zyanfx/Zyan
        /// <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);
        }
コード例 #2
0
ファイル: InterLinqFieldInfo.cs プロジェクト: zyanfx/Zyan
        /// <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);
        }
コード例 #3
0
        /// <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
        }
コード例 #4
0
        /// <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
        }
コード例 #5
0
        /// <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
        }
コード例 #6
0
        /// <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
        }
コード例 #7
0
        /// <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
        }
コード例 #8
0
        /// <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
        }
コード例 #9
0
        /// <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
        }
コード例 #10
0
        /// <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
        }
コード例 #11
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);
            }
            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);
        }
コード例 #12
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);
            }
            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);
        }
コード例 #13
0
 /// <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);
 }
コード例 #14
0
ファイル: InterLinqMethodInfo.cs プロジェクト: yallie/zyan
 /// <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));
         }
     }
 }
コード例 #15
0
ファイル: InterLinqMemberInfo.cs プロジェクト: zyanfx/Zyan
 /// <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);
 }
コード例 #16
0
 /// <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);
 }
コード例 #17
0
ファイル: InterLinqPropertyInfo.cs プロジェクト: yallie/zyan
 /// <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);
 }