Use internal when exposing low-level types like IntPtr
@ryzngard がすでに取り組んでいます。
2026年5月5日 から。
評価
この issue はまだ評価されていません。
説明
Is your feature request related to a problem? Please describe.
No, this is about hardening the API.
Exposing low-level types like IntPtr as public in user-facing code is bad practice for an interop library like this. It causes excessive, unnecessary information and APIs being exposed to users, which could lead to confusion and error-prone code being made with it.
Describe the solution you'd like
Refactor client-facing low-level members, constructors, etc. to be internal (or protected internal if necessary). For example, NSArray<T> has a public constructor with an IntPtr parameter. Users do not need to know about this, and makes the API messier for those trying to simply interface with it. Using an AssemblyInfo.cs can allow internal members to be available to other Apple assemblies without having to expose unnecessary data to users.
Describe alternatives you've considered
There are none.
Additional context
https://docs.unity3d.com/2020.1/Documentation/Manual/ScriptCompilationAssemblyDefinitionFiles.html
Example AssemblyInfo.cs file:
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Apple.Core.Tests")]
- 主要言語
- C#
- スター
- 986
- フォーク
- 252
- 平均マージ
- 1時間 36分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apple/unityplugins のほかの issue
-
bug Plug-in - GameKit
apple/unityplugins#98 · コメント 2 件 · 担当者 1 名 ·
-
feature request
apple/unityplugins#94 · コメント 3 件 · リアクション 8 件 · 担当者 1 名 ·
-
feature request Plug-in - GameKit
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
apple/unityplugins#93 · リアクション 1 件 ·
-
bug Plug-in - GameKit
apple/unityplugins#92 · リアクション 1 件 · 担当者 1 名 ·
-
feature request
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apple/unityplugins#86 · リアクション 3 件 ·
apple/unityplugins の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nightscout/nocturne#1379 ·
-
priority-0
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100