Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void marshallAsElement(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.dmr.ModelNode resourceModel, boolean marshallDefault, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
            public override void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, bool marshallDefault, XMLStreamWriter writer)
            {
                resourceModel = resourceModel.get(attribute.XmlName);
                writer.writeStartElement(attribute.Name);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.util.List<org.jboss.dmr.Property> properties = resourceModel.asPropertyList();
                IList <Property> properties = resourceModel.asPropertyList();

                foreach (Property property in properties)
                {
                    writer.writeStartElement([email protected]);
                    writer.writeAttribute([email protected], property.Name);
                    writer.writeCharacters(property.Value.asString());
                    writer.writeEndElement();
                }
                writer.writeEndElement();
            }