public ActivityPropertyHolder(DynamicActivityXamlReader parent, XamlReader reader) { this.parent = parent; this.nodes = new XamlNodeQueue(parent.SchemaContext); IXamlLineInfo innerReaderLineInfo = parent.innerReaderLineInfo; reader.Read(); this.nodes.Writer.WriteStartObject(parent.activityPropertyXamlType, innerReaderLineInfo); int num = 1; int a = 0; int num3 = 0; bool flag = reader.Read(); while (flag) { XamlMember activityPropertyName; switch (reader.NodeType) { case XamlNodeType.StartObject: case XamlNodeType.GetObject: { num++; DynamicActivityXamlReader.IncrementIfPositive(ref a); DynamicActivityXamlReader.IncrementIfPositive(ref num3); if ((num3 <= 0) || !(reader.Type == parent.xamlTypeXamlType)) { goto Label_0231; } this.nodes.Writer.WriteStartObject(parent.typeXamlType, innerReaderLineInfo); flag = reader.Read(); continue; } case XamlNodeType.EndObject: { num--; if (num != 0) { goto Label_0213; } flag = reader.Read(); continue; } case XamlNodeType.StartMember: if (!(reader.Member.DeclaringType == XamlLanguage.Property)) { goto Label_0231; } activityPropertyName = reader.Member; if (!(activityPropertyName == DynamicActivityXamlReader.xPropertyName)) { break; } activityPropertyName = parent.activityPropertyName; if (a == 0) { a = 1; } goto Label_0115; case XamlNodeType.EndMember: DynamicActivityXamlReader.DecrementIfPositive(ref a); DynamicActivityXamlReader.DecrementIfPositive(ref num3); goto Label_0231; case XamlNodeType.Value: if (a != 1) { goto Label_014F; } this.Name = reader.Value as string; goto Label_0231; default: goto Label_0231; } if (activityPropertyName == DynamicActivityXamlReader.xPropertyType) { activityPropertyName = parent.activityPropertyType; if (num3 == 0) { num3 = 1; } } else { if (activityPropertyName != DynamicActivityXamlReader.xPropertyAttributes) { throw FxTrace.Exception.AsError(DynamicActivityXamlReader.CreateXamlException(System.Activities.SR.PropertyMemberNotSupportedByActivityXamlServices(activityPropertyName.Name), innerReaderLineInfo)); } activityPropertyName = parent.activityPropertyAttributes; } Label_0115: this.nodes.Writer.WriteStartMember(activityPropertyName, innerReaderLineInfo); flag = reader.Read(); continue; Label_014F: if (num3 == 1) { XamlTypeName xamlTypeName = XamlTypeName.Parse(reader.Value as string, parent.namespaceTable); XamlType xamlType = parent.SchemaContext.GetXamlType(xamlTypeName); if (xamlType == null) { throw FxTrace.Exception.AsError(DynamicActivityXamlReader.CreateXamlException(System.Activities.SR.InvalidPropertyType(reader.Value as string, this.Name), innerReaderLineInfo)); } this.Type = xamlType; } goto Label_0231; Label_0213: DynamicActivityXamlReader.DecrementIfPositive(ref a); DynamicActivityXamlReader.DecrementIfPositive(ref num3); Label_0231: this.nodes.Writer.WriteNode(reader, innerReaderLineInfo); flag = reader.Read(); } reader.Close(); }