Example #1
0
		internal override DMemberRef GetImplementationInSuperTypes(DType/*!*/ type, bool searchSupertypes, ref bool inSupertype)
		{
			while (type != null && !type.IsUnknown)
			{
				KnownProperty result = type.GetDeclaredProperty<KnownProperty>(this.Name);
				if (result != null)
				{
					// private members are not visible from subtype:
					if (result.IsPrivate && inSupertype) break;

					return new DMemberRef(result, type);
				}

				if (!searchSupertypes) break;
				inSupertype = true;
				type = type.Base;
			}

			inSupertype = false;
			return null;
		}