System.Web.Compilation.TemplateControlCompiler.CheckBaseFieldOrProperty C# (CSharp) Method

CheckBaseFieldOrProperty() private method

private CheckBaseFieldOrProperty ( string id, Type type, MemberAttributes &ma ) : bool
id string
type System.Type
ma MemberAttributes
return bool
		bool CheckBaseFieldOrProperty (string id, Type type, ref MemberAttributes ma)
		{
			FieldInfo fld = parser.BaseType.GetField (id, noCaseFlags);

			Type other = null;
			if (fld == null || fld.IsPrivate) {
				PropertyInfo prop = parser.BaseType.GetProperty (id, noCaseFlags);
				if (prop != null) {
					MethodInfo setm = prop.GetSetMethod (true);
					if (setm != null)
						other = prop.PropertyType;
				}
			} else {
				other = fld.FieldType;
			}
			
			if (other == null)
				return false;

			if (!other.IsAssignableFrom (type)) {
				ma |= MemberAttributes.New;
				return false;
			}

			return true;
		}
		
TemplateControlCompiler