Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Foundation] Improve visibility of NSObject members in intellisense #19106

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Foundation/NSObject2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using System.Drawing;
#endif
using System.Runtime.Versioning;
using System.Diagnostics;

#if NET
using System.Runtime.InteropServices.ObjectiveC;
Expand Down Expand Up @@ -178,6 +179,8 @@ internal bool IsRegisteredToggleRef {
set { flags = value ? (flags | Flags.RegisteredToggleRef) : (flags & ~Flags.RegisteredToggleRef); }
}

[DebuggerBrowsable (DebuggerBrowsableState.Never)]
[EditorBrowsable (EditorBrowsableState.Never)]
protected internal bool IsDirectBinding {
get { return ((flags & Flags.IsDirectBinding) == Flags.IsDirectBinding); }
set { flags = value ? (flags | Flags.IsDirectBinding) : (flags & ~Flags.IsDirectBinding); }
Expand Down Expand Up @@ -214,6 +217,7 @@ public NSObject (NSObjectFlag x)
InitializeObject (alloced);
}

[EditorBrowsable (EditorBrowsableState.Never)]
#if NET
protected internal NSObject (NativeHandle handle)
#else
Expand All @@ -223,6 +227,7 @@ public NSObject (NativeHandle handle)
{
}

[EditorBrowsable (EditorBrowsableState.Never)]
#if NET
protected NSObject (NativeHandle handle, bool alloced)
#else
Expand Down Expand Up @@ -322,6 +327,7 @@ static void RegisterToggleReference (NSObject obj, IntPtr handle, bool isCustomT
}

#if !XAMCORE_3_0
[EditorBrowsable (EditorBrowsableState.Never)]
public static bool IsNewRefcountEnabled ()
{
return true;
Expand All @@ -333,6 +339,7 @@ public static bool IsNewRefcountEnabled ()
-The new refcounting is enabled; and
-The class is not a custom type - it must wrap a framework class.
*/
[EditorBrowsable (EditorBrowsableState.Never)]
protected void MarkDirty ()
{
MarkDirty (false);
Expand Down Expand Up @@ -598,6 +605,7 @@ public NSObject DangerousAutorelease ()
return this;
}

[EditorBrowsable (EditorBrowsableState.Never)]
public NativeHandle SuperHandle {
get {
if (handle == IntPtr.Zero)
Expand All @@ -607,6 +615,7 @@ public NativeHandle SuperHandle {
}
}

[EditorBrowsable (EditorBrowsableState.Never)]
public NativeHandle Handle {
get { return handle; }
set {
Expand Down Expand Up @@ -1118,12 +1127,14 @@ public IDisposable AddObserver (NSString key, NSKeyValueObservingOptions options
return o;
}

[EditorBrowsable (EditorBrowsableState.Never)]
public static NSObject Alloc (Class kls)
{
var h = Messaging.IntPtr_objc_msgSend (kls.Handle, Selector.GetHandle (Selector.Alloc));
return new NSObject (h, true);
}

[EditorBrowsable (EditorBrowsableState.Never)]
public void Init ()
{
if (handle == IntPtr.Zero)
Expand Down