Browse Source

read connection ids as x:ConnectionId from binary stream

pull/252/head
Siegfried Pammer 14 years ago
parent
commit
11b4f4babd
  1. 17
      ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlBamlReader.cs

17
ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlBamlReader.cs

@ -398,7 +398,7 @@ namespace Ricciolo.StylesExplorer.MarkupReflection @@ -398,7 +398,7 @@ namespace Ricciolo.StylesExplorer.MarkupReflection
this.ReadXmlnsProperty();
break;
case BamlRecordType.ConnectionId:
reader.ReadInt32();
this.ReadConnectionId();
break;
case BamlRecordType.DeferableContentStart:
Current.IsDeferred = true;
@ -505,6 +505,12 @@ namespace Ricciolo.StylesExplorer.MarkupReflection @@ -505,6 +505,12 @@ namespace Ricciolo.StylesExplorer.MarkupReflection
}
}
void ReadConnectionId()
{
int id = reader.ReadInt32();
nodes.Enqueue(new XmlBamlSimpleProperty(XWPFNamespace, "ConnectionId", id.ToString()));
}
void ReadTextWithId()
{
short textId = reader.ReadInt16();
@ -1489,19 +1495,16 @@ namespace Ricciolo.StylesExplorer.MarkupReflection @@ -1489,19 +1495,16 @@ namespace Ricciolo.StylesExplorer.MarkupReflection
bool isAttached = (descriptor != null && descriptor.IsAttached);
bool differentType = ((propertyDeclaration.DeclaringType != propertyDeclaration.DeclaringType || !isDescendant));
if (withPrefix)
{
if (withPrefix) {
XmlPIMapping mapping = FindByClrNamespaceAndAssemblyId(propertyDeclaration.DeclaringType.Namespace, propertyDeclaration.DeclaringType.AssemblyId);
string prefix = (mapping != null) ? this.LookupPrefix(mapping.XmlNamespace, false) : null;
if (!String.IsNullOrEmpty(prefix))
{
if (!String.IsNullOrEmpty(prefix)) {
sb.Append(prefix);
sb.Append(":");
}
}
if ((differentType || isAttached || !checkType) && propertyDeclaration.DeclaringType.Name.Length > 0)
{
if ((differentType || isAttached || !checkType) && propertyDeclaration.DeclaringType.Name.Length > 0) {
sb.Append(propertyDeclaration.DeclaringType.Name);
sb.Append(".");
}

Loading…
Cancel
Save