Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
ref - brk|doc|prt - Refactored loading library (pt...
Browse files Browse the repository at this point in the history
.... 1)

---

Type: ref
Breaking: True
Doc Required: True
Backport Required: False
Part: 1/2
  • Loading branch information
AptiviCEO committed Jul 10, 2024
1 parent a0b6526 commit cfebb0d
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 445 deletions.
60 changes: 0 additions & 60 deletions NativeLand/LibraryFile.cs

This file was deleted.

29 changes: 9 additions & 20 deletions NativeLand/LibraryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
//

using NativeLand.Tools;
using System;
using System.Runtime.InteropServices;

namespace NativeLand
Expand All @@ -28,23 +27,10 @@ namespace NativeLand
/// </summary>
public class LibraryItem
{
/// <summary>
/// Makes a new instance of this class
/// </summary>
/// <param name="platform">Binary platform.</param>
/// <param name="bitness">Binary bitness.</param>
/// <param name="files">A collection of files for this bitness and platform.</param>
public LibraryItem(Platform platform, Architecture bitness, params LibraryFile[] files)
{
Platform = platform;
Bitness = bitness;
Files = files;
}

/// <summary>
/// Library files.
/// </summary>
public LibraryFile[] Files { get; set; }
public string[] Files { get; set; }

/// <summary>
/// Platform for which this binary is used.
Expand All @@ -57,13 +43,16 @@ public LibraryItem(Platform platform, Architecture bitness, params LibraryFile[]
public Architecture Bitness { get; set; }

/// <summary>
/// Unpacks the library and directly loads it if on Windows.
/// Makes a new instance of this class
/// </summary>
/// <param name="targetDirectory">Target directory to which library is extracted.</param>
/// <param name="loadLibrary">Load library explicitly.</param>
public virtual void LoadItem(string targetDirectory, bool loadLibrary)
/// <param name="platform">Binary platform.</param>
/// <param name="bitness">Binary bitness.</param>
/// <param name="paths">A collection of absolute paths for files for this bitness and platform.</param>
public LibraryItem(Platform platform, Architecture bitness, params string[] paths)
{
throw new InvalidOperationException("This item was never added to the LibraryManager. Create a LibraryManager, add this item and then call LibraryManager.LoadNativeLibrary().");
Platform = platform;
Bitness = bitness;
Files = paths;
}
}
}
140 changes: 0 additions & 140 deletions NativeLand/LibraryItemInternal.cs

This file was deleted.

Loading

0 comments on commit cfebb0d

Please sign in to comment.