-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from DomCR/DxfReader-sortensTable-fix
SortensTable Fix
- Loading branch information
Showing
13 changed files
with
234 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using ACadSharp.Attributes; | ||
using ACadSharp.Entities; | ||
|
||
namespace ACadSharp.Objects | ||
{ | ||
public partial class SortEntitiesTable | ||
{ | ||
/// <summary> | ||
/// Entity sorter based in their position in the collection. | ||
/// </summary> | ||
public class Sorter | ||
{ | ||
/// <inheritdoc/> | ||
[DxfCodeValue(5)] | ||
public ulong Handle | ||
{ | ||
get | ||
{ | ||
if (this._handle.HasValue) | ||
{ | ||
return this._handle.Value; | ||
} | ||
else | ||
{ | ||
return this.Entity.Handle; | ||
} | ||
} | ||
internal set { this._handle = value; } | ||
} | ||
|
||
/// <summary> | ||
/// Soft-pointer ID/handle to an entity | ||
/// </summary> | ||
[DxfCodeValue(331)] | ||
public Entity Entity { get; set; } | ||
|
||
private ulong? _handle; | ||
|
||
/// <summary> | ||
/// Sorter constructor with the entity and handle. | ||
/// </summary> | ||
/// <param name="entity">Enity in the block to be sorted.</param> | ||
/// <param name="handle">Sorter handle, will use the entity handle if null.</param> | ||
public Sorter(Entity entity, ulong? handle = null) | ||
{ | ||
this.Entity = entity; | ||
this._handle = handle; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.