public abstract class NativeObjectSecurity : CommonObjectSecurity
{
ExceptionFromErrorCode exception_from_error_code;
+#if !MOBILE
ResourceType resource_type;
+#endif
protected internal delegate Exception ExceptionFromErrorCode (int errorCode,
string name, SafeHandle handle,
internal NativeObjectSecurity (CommonSecurityDescriptor securityDescriptor, ResourceType resourceType)
: base (securityDescriptor)
{
+#if !MOBILE
resource_type = resourceType;
+#endif
}
protected NativeObjectSecurity (bool isContainer,
: base (isContainer)
{
exception_from_error_code = exceptionFromErrorCode;
+#if !MOBILE
resource_type = resourceType;
+#endif
}
protected NativeObjectSecurity (bool isContainer,
{
Persist (name, includeSections, null);
}
-
+
internal void PersistModifications (SafeHandle handle)
{
WriteLock();
internal virtual int InternalGet (SafeHandle handle,
AccessControlSections includeSections)
{
+#if MOBILE
+ throw new PlatformNotSupportedException ();
+#else
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
throw new PlatformNotSupportedException ();
out owner, out group,
out dacl, out sacl, out descriptor);
}, includeSections);
+#endif
}
internal virtual int InternalGet (string name,
AccessControlSections includeSections)
{
+#if MOBILE
+ throw new PlatformNotSupportedException ();
+#else
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
throw new PlatformNotSupportedException ();
out owner, out group,
out dacl, out sacl, out descriptor);
}, includeSections);
+#endif
}
+#if MOBILE
+ internal virtual int InternalSet (SafeHandle handle, AccessControlSections includeSections)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ internal virtual int InternalSet (string name, AccessControlSections includeSections)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+#else
internal virtual int InternalSet (SafeHandle handle,
AccessControlSections includeSections)
{
[return: MarshalAs (UnmanagedType.Bool)]
static extern bool IsValidSecurityDescriptor (IntPtr descriptor);
+ /*
struct SecurityDescriptor
{
public byte Revision, Size;
public ushort ControlFlags;
public IntPtr Owner, Group, Sacl, Dacl;
}
+ */
#endregion
+#endif
}
}