コード例 #1
0
        private IEnumerable <ProtoXamlInstruction> ParseNestedProperty(XamlType xamlType)
        {
            var propertyLocator      = PropertyLocator.Parse(reader.LocalName);
            var namespaceDeclaration = new NamespaceDeclaration(reader.Namespace, reader.Prefix);

            yield return(instructionBuilder.NonEmptyPropertyElement(xamlType.UnderlyingType, propertyLocator.PropertyName, namespaceDeclaration));

            reader.Read();

            foreach (var p in ParseInnerTextIfAny())
            {
                yield return(p);
            }

            SkipWhitespaces();

            if (reader.NodeType != XmlNodeType.EndElement)
            {
                foreach (var instruction in ParseChildren())
                {
                    yield return(instruction);
                }
            }

            yield return(instructionBuilder.EndTag());
        }
コード例 #2
0
ファイル: AttributeParser.cs プロジェクト: nagyistge/OmniXAML
 private AttributeAssignment GetAttribute()
 {
     return(new AttributeAssignment(PropertyLocator.Parse(reader.Name), reader.Value));
 }