public static void SetAttributeDataTypeIfNull(PssgSchema.Attribute attribute, Type attrType) { if (attribute.DataType == typeof(System.Exception)) { attribute.DataType = attrType; } }
public PssgAttribute(PssgSchema.Attribute attributeInfo, object data, PssgFile file, PssgNode ParentNode) { this.AttributeInfo = attributeInfo; this.data = data; this.file = file; this.ParentNode = ParentNode; }
public PssgAttribute(PssgAttribute attrToCopy) { this.file = attrToCopy.file; this.ParentNode = attrToCopy.ParentNode; this.AttributeInfo = attrToCopy.AttributeInfo; this.size = attrToCopy.size; this.data = attrToCopy.data; }
public PssgAttribute(XAttribute xAttr, PssgFile file, PssgNode node) { this.file = file; this.ParentNode = node; //this.id = PssgSchema.GetAttributeId(ParentNode.Name, xAttr.Name.LocalName); string attrName = xAttr.Name.LocalName.StartsWith("___") ? xAttr.Name.LocalName.Substring(3) : xAttr.Name.LocalName; this.AttributeInfo = PssgSchema.AddAttribute(this.ParentNode.Name, attrName);// PssgSchema.GetAttribute(this.ParentNode.Name, xAttr.Name.LocalName); this.data = this.FromString(xAttr.Value); PssgSchema.SetAttributeDataTypeIfNull(this.AttributeInfo, this.ValueType); }
public PssgAttribute(PssgBinaryReader reader, PssgFile file, PssgNode node) { this.file = file; this.ParentNode = node; int id = reader.ReadInt32(); this.AttributeInfo = PssgSchema.GetAttribute(id); this.size = reader.ReadInt32(); this.data = reader.ReadAttributeValue(this.AttributeInfo.DataType, size); this.AttributeInfo = PssgSchema.AddAttribute(this.ParentNode.Name, this.Name, this.ValueType); }