Skip to content

Commit

Permalink
[Cleanup] using statements and at lineinfo for notsupported xml elements
Browse files Browse the repository at this point in the history
  • Loading branch information
samatstariongroup committed Nov 17, 2024
1 parent 73f9be9 commit b1ba8bd
Show file tree
Hide file tree
Showing 19 changed files with 108 additions and 90 deletions.
7 changes: 4 additions & 3 deletions uml4net.xmi/Readers/Classification/GeneralizationReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ namespace uml4net.xmi.Readers.Classification
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO;

using uml4net.POCO;
using uml4net.POCO.Classification;
using Cache;
using Readers;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="GeneralizationReader"/> is to read an instance of <see cref="IGeneralization"/>
Expand Down
4 changes: 2 additions & 2 deletions uml4net.xmi/Readers/Classification/InstanceValueReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ namespace uml4net.xmi.Readers.Classification
using uml4net.POCO;
using uml4net.POCO.Classification;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.Values;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

Expand Down Expand Up @@ -119,7 +118,8 @@ public override IInstanceValue Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"InstanceValueReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"InstanceValueReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions uml4net.xmi/Readers/Classification/OperationReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@

namespace uml4net.xmi.Readers.Classification
{
using Cache;
using System;
using System.Collections.Generic;
using System.Xml;

using Microsoft.Extensions.Logging;

using uml4net.POCO;
using uml4net.POCO.Classification;
using uml4net.POCO.CommonStructure;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;
using System.Collections.Generic;

/// <summary>
/// The purpose of the <see cref="OperationReader"/> is to read an instance of <see cref="IOperation"/>
Expand Down Expand Up @@ -179,7 +179,8 @@ public override IOperation Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"OperationReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"OperationReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions uml4net.xmi/Readers/Classification/ParameterReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

namespace uml4net.xmi.Readers.Classification
{
using Cache;
using System;
using System.Xml;

Expand All @@ -29,8 +28,9 @@ namespace uml4net.xmi.Readers.Classification
using uml4net.POCO;
using uml4net.POCO.Classification;
using uml4net.POCO.CommonStructure;
using uml4net.xmi.Readers;
using uml4net.POCO.Values;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="ParameterReader"/> is to read an instance of <see cref="IParameter"/>
Expand Down Expand Up @@ -206,7 +206,8 @@ public override IParameter Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"ParameterReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"ParameterReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion uml4net.xmi/Readers/Classification/PropertyReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ public override IProperty Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"PropertyReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"PropertyReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions uml4net.xmi/Readers/CommonStructure/CommentReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@

namespace uml4net.xmi.Readers.CommonStructure
{
using System;
using System.Linq;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO;

using uml4net.POCO;
using uml4net.POCO.CommonStructure;
using Cache;
using Readers;
using System;
using System.Linq;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="CommentReader"/> is to read an instance of <see cref="IComment"/>
Expand Down
16 changes: 8 additions & 8 deletions uml4net.xmi/Readers/CommonStructure/ConstraintReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@

namespace uml4net.xmi.Readers.CommonStructure
{
using Cache;
using System;
using System.Collections.Generic;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO.Values;
using POCO;

using uml4net.POCO;
using uml4net.POCO.CommonStructure;

using Readers;
using System.Collections.Generic;
using uml4net.POCO.StructuredClassifiers;
using uml4net.POCO.Values;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="ConstraintReader"/> is to read an instance of <see cref="IConstraint"/>
Expand Down Expand Up @@ -133,7 +132,8 @@ public override IConstraint Read(XmlReader xmlReader)
this.ReadValueSpecification(constraint, xmlReader);
break;
default:
throw new NotImplementedException($"ConstraintReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"ConstraintReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions uml4net.xmi/Readers/CommonStructure/RealizationReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@

namespace uml4net.xmi.Readers.CommonStructure
{
using System;
using System.Linq;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO;

using uml4net.POCO;
using uml4net.POCO.CommonStructure;
using Cache;
using Readers;
using System;
using System.Collections.Generic;
using System.Linq;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="CommentReader"/> is to read an instance of <see cref="IRealization"/>
Expand Down
15 changes: 8 additions & 7 deletions uml4net.xmi/Readers/Packages/PackageReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@

namespace uml4net.xmi.Readers.Packages
{
using Cache;
using System;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO.SimpleClassifiers;
using POCO.StructuredClassifiers;
using POCO;

using uml4net.POCO;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.Packages;

using Readers;
using uml4net.POCO.SimpleClassifiers;
using uml4net.POCO.StructuredClassifiers;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="PackageReader"/> is to read an instance of <see cref="IPackage"/>
Expand Down Expand Up @@ -173,7 +173,8 @@ public override IPackage Read(XmlReader xmlReader)
this.ReadPackagedElements(package, xmlReader);
break;
default:
throw new NotImplementedException($"PackageReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"PackageReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@

namespace uml4net.xmi.Readers.SimpleClassifiers
{
using Cache;
using System;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO.CommonStructure;
using POCO;
using uml4net.POCO.SimpleClassifiers;

using Readers;
using uml4net.POCO;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.SimpleClassifiers;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="EnumerationLiteralReader"/> is to read an instance of <see cref="IEnumerationLiteral"/>
Expand Down Expand Up @@ -100,7 +100,8 @@ public override IEnumerationLiteral Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"EnumerationLiteralReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"EnumerationLiteralReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions uml4net.xmi/Readers/SimpleClassifiers/EnumerationReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@

namespace uml4net.xmi.Readers.SimpleClassifiers
{
using System;
using System.Collections.Generic;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO;

using uml4net.POCO;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.SimpleClassifiers;
using Cache;
using Readers;
using System;
using System.Xml;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="EnumerationReader"/> is to read an instance of <see cref="IEnumeration"/>
Expand Down Expand Up @@ -110,7 +113,8 @@ public override IEnumeration Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"EnumerationReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"EnumerationReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
17 changes: 8 additions & 9 deletions uml4net.xmi/Readers/SimpleClassifiers/InterfaceReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@

namespace uml4net.xmi.Readers.SimpleClassifiers
{
using Cache;
using System;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO.Classification;
using POCO;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.Packages;

using Packages;
using POCO.SimpleClassifiers;
using Readers;
using uml4net.POCO;
using uml4net.POCO.Classification;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.SimpleClassifiers;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="InterfaceReader"/> is to read an instance of <see cref="IInterface"/>
Expand Down Expand Up @@ -157,7 +155,8 @@ public override IInterface Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"InterfaceReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"InterfaceReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
13 changes: 8 additions & 5 deletions uml4net.xmi/Readers/SimpleClassifiers/PrimitiveTypeReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@

namespace uml4net.xmi.Readers.SimpleClassifiers
{
using System;
using System.Xml;

using Microsoft.Extensions.Logging;

using uml4net.POCO;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.SimpleClassifiers;
using uml4net.xmi.Cache;

using POCO;
using System.Xml;
using System;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="PrimitiveTypeReader"/> is to read an instance of <see cref="IPrimitiveType"/>
Expand Down Expand Up @@ -98,7 +100,8 @@ public override IPrimitiveType Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"PrimitiveTypeReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"PrimitiveTypeReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
17 changes: 8 additions & 9 deletions uml4net.xmi/Readers/StructuredClassifiers/AssociationReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@

namespace uml4net.xmi.Readers.StructuredClassifiers
{
using Cache;
using System;
using System.Collections.Generic;
using System.Xml;

using Microsoft.Extensions.Logging;
using POCO.Classification;
using POCO;

using uml4net.POCO;
using uml4net.POCO.Classification;
using uml4net.POCO.CommonStructure;
using uml4net.POCO.StructuredClassifiers;
using uml4net.POCO.Packages;

using Packages;
using Readers;
using System.Collections.Generic;
using uml4net.xmi.Cache;
using uml4net.xmi.Readers;

/// <summary>
/// The purpose of the <see cref="AssociationReader"/> is to read an instance of <see cref="IAssociation"/>
Expand Down Expand Up @@ -182,7 +180,8 @@ public override IAssociation Read(XmlReader xmlReader)
}
break;
default:
throw new NotImplementedException($"ClassReader: {xmlReader.LocalName}");
var defaultLineInfo = xmlReader as IXmlLineInfo;
throw new NotImplementedException($"AssociationReader: {xmlReader.LocalName} at line:position {defaultLineInfo.LineNumber}:{defaultLineInfo.LinePosition}");
}
}
}
Expand Down
Loading

0 comments on commit b1ba8bd

Please sign in to comment.