public XamlMember GetDottedProperty (XamlType tagType, string tagNamespace, XamlPropertyName propName, bool tagIsRoot)
{
if (tagType == null) {
throw new XamlInternalException(SR.Get("ParentlessPropertyElement", new object[] { propName.ScopedName }));
}
XamlMember xamlAttachableProperty = null;
XamlType xamlType = null;
string propNs = this.ResolveXamlNameNS(propName);
if (propNs == null) {
throw new XamlParseException(SR.Get("PrefixNotFound", new object[] { propName.Prefix }));
}
XamlType rootTagType = tagIsRoot ? tagType : null;
bool flag = false;
if (tagType.IsGeneric) {
flag = this.PropertyTypeMatchesGenericTagType(tagType, tagNamespace, propNs, propName.OwnerName);
if (flag) {
xamlAttachableProperty = this.GetInstanceOrAttachableProperty(tagType, propName.Name, rootTagType);
if (xamlAttachableProperty != null) {
return xamlAttachableProperty;
}
}
}
XamlTypeName typeName = new XamlTypeName(propNs, propName.Owner.Name);
xamlType = this.GetXamlType(typeName, true);
bool flag2 = tagType.CanAssignTo(xamlType);
if (flag2) {
xamlAttachableProperty = this.GetInstanceOrAttachableProperty(xamlType, propName.Name, rootTagType);
}
else {
xamlAttachableProperty = this.GetXamlAttachableProperty(xamlType, propName.Name);
}
if (xamlAttachableProperty != null) {
return xamlAttachableProperty;
}
XamlType declaringType = flag ? tagType : xamlType;
if (flag || flag2) {
return this.CreateUnknownMember(declaringType, propName.Name);
}
return this.CreateUnknownAttachableMember(declaringType, propName.Name);
}