Skip to content

Commit

Permalink
Update SysML Import
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickRitchie committed Oct 31, 2023
1 parent 8d5087d commit 57ecd35
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 216 deletions.
132 changes: 0 additions & 132 deletions src/MTConnect.NET-XML/Assets/QIF/XmlQIFDocumentWrapperAsset - Copy.cs

This file was deleted.

80 changes: 1 addition & 79 deletions src/MTConnect.NET-XML/Assets/QIF/XmlQIFDocumentWrapperAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// TrakHound Inc. licenses this file to you under the MIT license.

using MTConnect.Assets.Xml;
using MTConnect.Devices.Xml;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace MTConnect.Assets.QIF
Expand All @@ -15,8 +12,7 @@ public class XmlQIFDocumentWrapperAsset : XmlAsset
{
[XmlAttribute("qifDocumentType")]
public string QIFDocumentType { get; set; }

//[XmlText]

public XmlQIFDocument QIFDocument { get; set; }


Expand Down Expand Up @@ -54,79 +50,5 @@ public static void WriteXml(XmlWriter writer, IAsset asset)
writer.WriteEndElement();
}
}


#region "Xml Serialization"

//public void WriteXml(XmlWriter writer)
//{
// // Use static WriteXml()
//}

//public void ReadXml(XmlReader reader)
//{
// try
// {
// // Read Child Elements
// using (var inner = reader.ReadSubtree())
// {
// while (inner.Read())
// {
// var qifDocument = inner.ReadInnerXml();
// if (qifDocument != null)
// {

// }


// //if (inner.NodeType == XmlNodeType.Element)
// //{
// // // Create a copy of each Child Node so we can change the name to "Component" and deserialize it
// // // (Seems like a dirty way to do this but until an XmlAttribute can be found to ignore the Node's name/type
// // // and to always deserialize as a Component)
// // var doc = new XmlDocument();
// // var node = doc.ReadNode(inner);
// // foreach (XmlNode child in node.ChildNodes)
// // {
// // if (child.NodeType == XmlNodeType.Element)
// // {
// // // Create a new Node with the name of "Component"
// // var copy = doc.CreateNode(XmlNodeType.Element, "Component", null);

// // // Copy Attributes
// // foreach (XmlAttribute attribute in child.Attributes)
// // {
// // var attr = doc.CreateAttribute(attribute.Name);
// // attr.Value = attribute.Value;
// // copy.Attributes.Append(attr);
// // }

// // // Copy Text
// // copy.InnerText = child.InnerText;
// // copy.InnerXml = child.InnerXml;

// // // Deserialize the copied Node to the Component base class
// // var component = (XmlComponent)_serializer.Deserialize(new XmlNodeReader(copy));
// // component.Type = child.Name;
// // Components.Add(component);
// // }
// // }
// //}
// }
// }
// }
// catch { }

// // Advance Reader
// reader.Skip();
//}

//public XmlSchema GetSchema()
//{
// return (null);
//}

#endregion

}
}
5 changes: 0 additions & 5 deletions src/MTConnect.NET-XML/MTConnect.NET-XML.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Remove="Assets\QIF\XmlQIFDocumentWrapperAsset - Copy.cs" />
<Compile Remove="Streams\Serializers.cs" />
<Compile Remove="Streams\XmlComponentStream - Copy (2).cs" />
<Compile Remove="Streams\XmlComponentStream - Copy.cs" />
Expand All @@ -78,10 +77,6 @@
<Compile Remove="Streams\XmlStreamsResponseDocument - Copy.cs" />
</ItemGroup>

<ItemGroup>
<None Include="Assets\QIF\XmlQIFDocumentWrapperAsset - Copy.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 57ecd35

Please sign in to comment.