From f5cd32c1b552ffc07581e4da9185d1b12594628d Mon Sep 17 00:00:00 2001 From: DomCR Date: Thu, 14 Mar 2024 16:20:12 +0100 Subject: [PATCH] renaming --- ACadSharp.Tests/Common/Factory.cs | 2 +- ACadSharp/Entities/MLine.cs | 6 +++--- ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs | 4 ++-- .../DWG/DwgStreamWriters/DwgObjectWriter.Objects.cs | 6 +++--- .../DXF/DxfStreamWriter/DxfObjectsSectionWriter.cs | 8 ++++---- ACadSharp/IO/Templates/CadMLStyleTemplate.cs | 8 ++++---- ACadSharp/IO/Templates/CadMLineTemplate.cs | 2 +- ACadSharp/Objects/MLStyle.Element.cs | 2 +- ACadSharp/Objects/MLStyle.cs | 12 ++++++------ 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ACadSharp.Tests/Common/Factory.cs b/ACadSharp.Tests/Common/Factory.cs index 7f57fc14..c9199057 100644 --- a/ACadSharp.Tests/Common/Factory.cs +++ b/ACadSharp.Tests/Common/Factory.cs @@ -61,7 +61,7 @@ private static CadObject createObject(Type type, Type original, bool randomize) if (type == typeof(XRecord) || type == typeof(PlotSettings) || type == typeof(Material) - || type == typeof(MLStyle) + || type == typeof(MLineStyle) || type == typeof(Layout) || type == typeof(Group) || type == typeof(CadDictionary) diff --git a/ACadSharp/Entities/MLine.cs b/ACadSharp/Entities/MLine.cs index d97a5e7a..0174e2aa 100644 --- a/ACadSharp/Entities/MLine.cs +++ b/ACadSharp/Entities/MLine.cs @@ -34,7 +34,7 @@ public partial class MLine : Entity /// Do not modify this field without also updating the associated entry in the MLINESTYLE dictionary /// [DxfCodeValue(DxfReferenceType.Handle | DxfReferenceType.Name, 340)] - public MLStyle MLStyle + public MLineStyle MLStyle { get { return _style; } set @@ -83,7 +83,7 @@ public MLStyle MLStyle [DxfCodeValue(DxfReferenceType.Count, 72)] public List Vertices { get; set; } = new List(); - private MLStyle _style = MLStyle.Default; + private MLineStyle _style = MLineStyle.Default; public MLine() : base() { } @@ -91,7 +91,7 @@ public override CadObject Clone() { MLine clone = (MLine)base.Clone(); - clone.MLStyle = (MLStyle)(this.MLStyle?.Clone()); + clone.MLStyle = (MLineStyle)(this.MLStyle?.Clone()); clone.Vertices.Clear(); foreach (var item in this.Vertices) diff --git a/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs b/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs index 9e04543a..84201bc0 100644 --- a/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs +++ b/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs @@ -4599,7 +4599,7 @@ private CadTemplate readGroup() private CadTemplate readMLStyle() { - MLStyle mlineStyle = new MLStyle(); + MLineStyle mlineStyle = new MLineStyle(); CadMLStyleTemplate template = new CadMLStyleTemplate(mlineStyle); this.readCommonNonEntityData(template); @@ -4651,7 +4651,7 @@ 1024 512 int nlines = this._objectReader.ReadByte(); for (int i = 0; i < nlines; ++i) { - MLStyle.Element element = new MLStyle.Element(); + MLineStyle.Element element = new MLineStyle.Element(); CadMLStyleTemplate.ElementTemplate elementTemplate = new CadMLStyleTemplate.ElementTemplate(element); //Offset BD Offset of this segment diff --git a/ACadSharp/IO/DWG/DwgStreamWriters/DwgObjectWriter.Objects.cs b/ACadSharp/IO/DWG/DwgStreamWriters/DwgObjectWriter.Objects.cs index d9e574b6..b3c2c536 100644 --- a/ACadSharp/IO/DWG/DwgStreamWriters/DwgObjectWriter.Objects.cs +++ b/ACadSharp/IO/DWG/DwgStreamWriters/DwgObjectWriter.Objects.cs @@ -55,7 +55,7 @@ private void writeObject(CadObject obj) case Layout layout: this.writeLayout(layout); break; - case MLStyle style: + case MLineStyle style: this.writeMLStyle(style); break; case PlotSettings plotsettings: @@ -223,7 +223,7 @@ private void writeLayout(Layout layout) } } - private void writeMLStyle(MLStyle mlineStyle) + private void writeMLStyle(MLineStyle mlineStyle) { //Common: //Name TV Name of this style @@ -277,7 +277,7 @@ private void writeMLStyle(MLStyle mlineStyle) //linesinstyle RC Number of lines in this style this._writer.WriteByte((byte)mlineStyle.Elements.Count); - foreach (MLStyle.Element element in mlineStyle.Elements) + foreach (MLineStyle.Element element in mlineStyle.Elements) { //Offset BD Offset of this segment this._writer.WriteBitDouble(element.Offset); diff --git a/ACadSharp/IO/DXF/DxfStreamWriter/DxfObjectsSectionWriter.cs b/ACadSharp/IO/DXF/DxfStreamWriter/DxfObjectsSectionWriter.cs index e903a215..4ce649ac 100644 --- a/ACadSharp/IO/DXF/DxfStreamWriter/DxfObjectsSectionWriter.cs +++ b/ACadSharp/IO/DXF/DxfStreamWriter/DxfObjectsSectionWriter.cs @@ -57,7 +57,7 @@ protected void writeObject(T co) case Layout layout: this.writeLayout(layout); break; - case MLStyle mlStyle: + case MLineStyle mlStyle: this.writeMLStyle(mlStyle); break; case PlotSettings plotSettings: @@ -195,9 +195,9 @@ protected void writeLayout(Layout layout) this._writer.WriteHandle(330, layout.AssociatedBlock.Owner, map); } - protected void writeMLStyle(MLStyle style) + protected void writeMLStyle(MLineStyle style) { - DxfClassMap map = DxfClassMap.Create(); + DxfClassMap map = DxfClassMap.Create(); this._writer.Write(100, DxfSubclassMarker.MLineStyle); @@ -212,7 +212,7 @@ protected void writeMLStyle(MLStyle style) this._writer.Write(51, style.StartAngle, map); this._writer.Write(52, style.EndAngle, map); this._writer.Write(71, (short)style.Elements.Count, map); - foreach (MLStyle.Element element in style.Elements) + foreach (MLineStyle.Element element in style.Elements) { this._writer.Write(49, element.Offset, map); this._writer.Write(62, element.Color.Index, map); diff --git a/ACadSharp/IO/Templates/CadMLStyleTemplate.cs b/ACadSharp/IO/Templates/CadMLStyleTemplate.cs index 55def30f..f09a4355 100644 --- a/ACadSharp/IO/Templates/CadMLStyleTemplate.cs +++ b/ACadSharp/IO/Templates/CadMLStyleTemplate.cs @@ -5,16 +5,16 @@ namespace ACadSharp.IO.Templates { - internal class CadMLStyleTemplate : CadTemplate + internal class CadMLStyleTemplate : CadTemplate { public class ElementTemplate : ICadObjectTemplate { public ulong? LinetypeHandle { get; set; } public int? LinetypeIndex { get; set; } - public MLStyle.Element Element { get; set; } + public MLineStyle.Element Element { get; set; } - public ElementTemplate(MLStyle.Element element) + public ElementTemplate(MLineStyle.Element element) { this.Element = element; } @@ -54,7 +54,7 @@ public void Build(CadDocumentBuilder builder) public List ElementTemplates { get; set; } = new List(); - public CadMLStyleTemplate(MLStyle mlStyle) : base(mlStyle) { } + public CadMLStyleTemplate(MLineStyle mlStyle) : base(mlStyle) { } public override void Build(CadDocumentBuilder builder) { diff --git a/ACadSharp/IO/Templates/CadMLineTemplate.cs b/ACadSharp/IO/Templates/CadMLineTemplate.cs index 676c2efd..d56b04b6 100644 --- a/ACadSharp/IO/Templates/CadMLineTemplate.cs +++ b/ACadSharp/IO/Templates/CadMLineTemplate.cs @@ -115,7 +115,7 @@ public override void Build(CadDocumentBuilder builder) MLine mLine = this.CadObject as MLine; - if (builder.TryGetCadObject(this.MLineStyleHandle, out MLStyle style)) + if (builder.TryGetCadObject(this.MLineStyleHandle, out MLineStyle style)) { mLine.MLStyle = style; } diff --git a/ACadSharp/Objects/MLStyle.Element.cs b/ACadSharp/Objects/MLStyle.Element.cs index c66f543c..41b7a197 100644 --- a/ACadSharp/Objects/MLStyle.Element.cs +++ b/ACadSharp/Objects/MLStyle.Element.cs @@ -3,7 +3,7 @@ namespace ACadSharp.Objects { - public partial class MLStyle + public partial class MLineStyle { public class Element { diff --git a/ACadSharp/Objects/MLStyle.cs b/ACadSharp/Objects/MLStyle.cs index f2d2f367..361f134f 100644 --- a/ACadSharp/Objects/MLStyle.cs +++ b/ACadSharp/Objects/MLStyle.cs @@ -4,7 +4,7 @@ namespace ACadSharp.Objects { /// - /// Represents a object + /// Represents a object /// /// /// Object name
@@ -12,7 +12,7 @@ namespace ACadSharp.Objects ///
[DxfName(DxfFileToken.ObjectMLStyle)] [DxfSubClass(DxfSubclassMarker.MLineStyle)] - public partial class MLStyle : CadObject, INamedCadObject + public partial class MLineStyle : CadObject, INamedCadObject { /// /// Default multiline style name @@ -22,7 +22,7 @@ public partial class MLStyle : CadObject, INamedCadObject /// /// Gets the default MLine style /// - public static MLStyle Default { get { return new MLStyle(DefaultName); } } + public static MLineStyle Default { get { return new MLineStyle(DefaultName); } } /// public override ObjectType ObjectType => ObjectType.MLINESTYLE; @@ -76,11 +76,11 @@ public partial class MLStyle : CadObject, INamedCadObject /// Elements in the style /// [DxfCodeValue(DxfReferenceType.Count, 71)] - public List Elements { get; } = new List(); + public List Elements { get; } = new List(); - internal MLStyle() { } + internal MLineStyle() { } - public MLStyle(string name) + public MLineStyle(string name) { this.Name = name; }