Esempio n. 1
0
        /// <summary>
        /// Creates a new instance of <see cref="GenericArgumentData"/>.
        /// </summary>
        /// <param name="genericArgumentType">Generic argument type.</param>
        /// <param name="declaringMember">Declaring member.</param>
        internal GenericArgumentData(Type genericArgumentType, MemberData declaringMember) : base(genericArgumentType.Name, declaringMember)
        {
            _constraints = new Lazy <IReadOnlyList <TypeData> >(() => ((Type)GenericArgumentType).GetGenericParameterConstraints().Select(type => type.GetTypeData()).ToArray());

            GenericArgumentType = genericArgumentType.GetTypeData();
        }
Esempio n. 2
0
 public bool Equals(MemberData memberData)
 {
     return(!ReferenceEquals(null, memberData) && Name.Path == memberData.Name.Path);
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new instance of <see cref="MemberData"/>.
 /// </summary>
 /// <param name="name">Name.</param>
 /// <param name="declaringMember">Declaring member.</param>
 protected internal MemberData(string name, MemberData declaringMember)
 {
     Name = name;
     Path = $"{declaringMember.Path}.{name}";
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new instance of <see cref="ModifierData"/>.
 /// </summary>
 /// <param name="modifierFlags">Modifier flags.</param>
 /// <param name="name">Name.</param>
 /// <param name="declaringMember">Declaring member.</param>
 protected internal ModifierData(BitField <ModifierFlags> modifierFlags, string name, MemberData declaringMember) : base(name, declaringMember)
 {
     _modifierFlags = modifierFlags;
 }