示例#1
0
        public override void OnAttribute(Attribute pair)
        {
            CheckBlockStart(pair);

            _jsonWriter.WritePropertyName((pair.NsPrefix != null ? pair.NsPrefix + "." : "") + pair.Name);
            ResolveValue(pair);
        }
示例#2
0
        /// <inheritdoc />
        public override void Visit(Attribute attribute)
        {
            CheckBlockStart(attribute);

            JsonWriter.WritePropertyName((attribute.NsPrefix != null ? attribute.NsPrefix + "." : "") + attribute.Name);
            ResolveValue(attribute);
        }
示例#3
0
 public override void Visit(Attribute pair)
 {
     PrintNodeName(pair);
     PrintNodeStart(pair);
     base.Visit(pair);
     PrintNodeEnd(pair);
 }
        private void ResolveTypeAttribute(Attribute attribute)
        {
            var typeInfo = attribute.Value?.Split(':');

            if (!(typeInfo?.Length > 1))
            {
                return;
            }
            var nsPrefix = typeInfo[0];

            NamespaceResolver.GetPrefixAndNs(nsPrefix, attribute, CurrentDocument, CurrentModuleMember, out var prefix, out var _);
            OnValue($"{prefix}:{typeInfo[1]}", ValueType.FreeOpenString);
        }