System.Xaml.XamlXmlParser.ProcessAttributesToMember C# (CSharp) Method

ProcessAttributesToMember() public method

public ProcessAttributesToMember ( XamlSchemaContext sctx, StartTagInfo sti, XamlType xt ) : void
sctx XamlSchemaContext
sti StartTagInfo
xt XamlType
return void
		void ProcessAttributesToMember (XamlSchemaContext sctx, StartTagInfo sti, XamlType xt)
		{
			foreach (var p in sti.Attributes) {
				int idx = p.Key.IndexOf (':');
				string prefix = idx > 0 ? p.Key.Substring (0, idx) : String.Empty;
				string aname = idx > 0 ? p.Key.Substring (idx + 1) : p.Key;
				idx = aname.IndexOf ('.');
				if (idx > 0) {
					string apns = prefix.Length > 0 ? r.LookupNamespace (prefix) : r.NamespaceURI;
					var apname = aname.Substring (0, idx);
					var axtn = new XamlTypeName (apns, apname, null);
					var at = sctx.GetXamlType (axtn);
					var am = at.GetAttachableMember (aname.Substring (idx + 1));
					if (am != null)
						sti.Members.Add (new Pair (am, p.Value));
					// ignore unknown attribute
				}
				var xm = xt.GetMember (aname);
				if (xm != null)
					sti.Members.Add (new Pair (xm, p.Value));
				// ignore unknown attribute
			}
		}