public override void Deserialize(XElement parentNode, SerializationContext context) { base.Deserialize(parentNode, context); if (parentNode.Attribute("Caption") != null) { Caption = SerializationContext.DecodeString(parentNode.Attribute("Caption").Value); } SetProjectVersion(context.CurrentProjectVersion); }
public override void Deserialize(XElement parentNode, SerializationContext context) { base.Deserialize(parentNode, context); this.IsSealed = SerializationContext.DecodeBool(parentNode.Attribute("IsSealed").Value); this.Name = SerializationContext.DecodeString(parentNode.Attribute("Name").Value); baseTypeGuid = this.DeserializeIDRef("baseTypeID", parentNode, context, true); XAttribute baseTypeAttribute = parentNode.Attribute("baseType"); if (baseTypeAttribute != null) { if (context.TypeDict != null && context.TypeDict.ContainsKey(baseTypeAttribute.Value)) { baseTypeGuid = context.TypeDict[baseTypeAttribute.Value]; } } XAttribute xsdAtomicAttribute = parentNode.Attribute("xsdAtomic"); if (xsdAtomicAttribute != null) { this.XSDAtomic = SerializationContext.DecodeBool(xsdAtomicAttribute.Value); } componentGuid = this.DeserializeIDRef("componentId", parentNode, context, true); representedPIMTypeGuid = this.DeserializeIDRef("representedPIMTypeID", parentNode, context, true); XElement xsdDefinitionElement = parentNode.Element(context.ExolutioNS + "XSDDefinition"); if (xsdDefinitionElement != null) { this.XSDDefinition = ((XCData)xsdDefinitionElement.Nodes().First()).Value; } XAttribute xsdAtomicAtribute = parentNode.Attribute("XSDAtomic"); if (xsdAtomicAtribute != null) { this.XSDAtomic = true; } XAttribute xsdDefinitionAttribute = parentNode.Attribute("XSDDefinition"); if (xsdDefinitionAttribute != null) { this.XSDDefinition = xsdDefinitionAttribute.Value; } this.DeserializeWrappedCollection("Operations", Operations, ModelOperation.CreateInstance, parentNode, context, true); SetProjectVersion(context.CurrentProjectVersion); }
public override void Deserialize(XElement parentNode, SerializationContext context) { base.Deserialize(parentNode, context); this.DeserializeCardinality(parentNode, context); this.attributeTypeGuid = this.DeserializeAttributeType(parentNode, context); if (parentNode.Attribute("DefaultValue") != null) { DefaultValue = SerializationContext.DecodeString(parentNode.Attribute("DefaultValue").Value); } pimClassGuid = this.DeserializeIDRef("pimClassID", parentNode, context, false); this.PIMSchema.PIMAttributes.Add(this); }
public override void Deserialize(XElement parentNode, SerializationContext context) { base.Deserialize(parentNode, context); if (parentNode.Attribute("Label") != null) { Label = SerializationContext.DecodeString(parentNode.Attribute("Label").Value); } if (parentNode.Attribute("Number") != null) { Number = SerializationContext.DecodeInt(parentNode.Attribute("Number").Value); } branchedFromGuid = this.DeserializeIDRef("branchedFromVerID", parentNode, context, true); }
public override void Deserialize(XElement parentNode, SerializationContext context) { base.Deserialize(parentNode, context); this.schemaGuid = context.CurrentSchemaGuid; if (parentNode.Attribute("Name") != null) { this.Name = SerializationContext.DecodeString(parentNode.Attribute("Name").Value); } else { //this.Name = string.Empty; } context.TagGuid = this.ID; this.DeserializeWrappedCollection("AppliedStereotypes", AppliedStereotypes, StereotypeInstance.CreateInstance, parentNode, context, true); context.TagGuid = null; this.schemaGuid = context.CurrentSchemaGuid; }
public override void Deserialize(XElement parentNode, SerializationContext context) { base.Deserialize(parentNode, context); schemaGuid = this.DeserializeIDRef("schemaID", parentNode, context); if (parentNode.Attribute("Caption") != null) { Caption = SerializationContext.DecodeString(parentNode.Attribute("Caption").Value); } foreach (XElement element in parentNode.Element(context.ExolutioNS + "Components").Elements()) { Guid componentGuid = this.DeserializeIDRef("componentID", element, context); Component component; try { component = (Component)Project.TranslateComponent(componentGuid); } catch (Exception) { continue; } ViewHelper.ViewHelper viewHelper = viewHelperFactoryMethods[Project.TranslateComponent(componentGuid).GetType()](); ((IComponentViewHelper)viewHelper).Component = component; if (element.Element(context.ExolutioNS + "ViewHelper") != null) { viewHelper.Deserialize(element.Element(context.ExolutioNS + "ViewHelper"), context); ViewHelpers[component] = viewHelper; } Components.Add(component); } SetProjectVersion(context.CurrentProjectVersion); }