using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Claims;
using System.Security.Permissions;
using System.Threading.Tasks;
using FxResources.System.Security.Principal.Windows;
using Microsoft.CodeAnalysis;
using Microsoft.Win32.SafeHandles;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: CLSCompliant(true)]
[assembly: SupportedOSPlatform("windows")]
[assembly: AssemblyDefaultAlias("System.Security.Principal.Windows")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyMetadata("NotSupported", "True")]
[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: AssemblyMetadata("PreferInbox", "True")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyDescription("System.Security.Principal.Windows")]
[assembly: AssemblyFileVersion("5.0.20.51904")]
[assembly: AssemblyInformationalVersion("5.0.0+cf258a14b70ad9069470a108f13765e0e5988f51")]
[assembly: AssemblyProduct("Microsoft® .NET")]
[assembly: AssemblyTitle("System.Security.Principal.Windows")]
[assembly: AssemblyMetadata("RepositoryUrl", "git://github.com/dotnet/runtime")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("5.0.0.0")]
[module: UnverifiableCode]
[module: System.Runtime.CompilerServices.NullablePublicOnly(false)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class NullablePublicOnlyAttribute : Attribute
{
public readonly bool IncludesInternals;
public NullablePublicOnlyAttribute(bool P_0)
{
IncludesInternals = P_0;
}
}
}
namespace FxResources.System.Security.Principal.Windows
{
internal static class SR
{
}
}
namespace Microsoft.Win32.SafeHandles
{
public sealed class SafeAccessTokenHandle : SafeHandle
{
public static SafeAccessTokenHandle InvalidHandle
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public override bool IsInvalid
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public SafeAccessTokenHandle(IntPtr handle)
: base((IntPtr)0, ownsHandle: false)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
protected override bool ReleaseHandle()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
}
namespace System
{
internal static class SR
{
private static readonly bool s_usingResourceKeys = AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out var isEnabled) && isEnabled;
private static ResourceManager s_resourceManager;
internal static ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new ResourceManager(typeof(SR)));
internal static string Arg_EmptyCollection => GetResourceString("Arg_EmptyCollection");
internal static string Arg_EnumIllegalVal => GetResourceString("Arg_EnumIllegalVal");
internal static string Argument_ImpersonateUser => GetResourceString("Argument_ImpersonateUser");
internal static string Argument_ImproperType => GetResourceString("Argument_ImproperType");
internal static string Argument_InvalidImpersonationToken => GetResourceString("Argument_InvalidImpersonationToken");
internal static string Argument_InvalidValue => GetResourceString("Argument_InvalidValue");
internal static string Argument_TokenZero => GetResourceString("Argument_TokenZero");
internal static string ArgumentOutOfRange_ArrayTooSmall => GetResourceString("ArgumentOutOfRange_ArrayTooSmall");
internal static string ArgumentOutOfRange_NeedNonNegNum => GetResourceString("ArgumentOutOfRange_NeedNonNegNum");
internal static string Argument_StringZeroLength => GetResourceString("Argument_StringZeroLength");
internal static string IdentityReference_AccountNameTooLong => GetResourceString("IdentityReference_AccountNameTooLong");
internal static string IdentityReference_CannotCreateLogonIdsSid => GetResourceString("IdentityReference_CannotCreateLogonIdsSid");
internal static string IdentityReference_DomainNameTooLong => GetResourceString("IdentityReference_DomainNameTooLong");
internal static string IdentityReference_DomainSidRequired => GetResourceString("IdentityReference_DomainSidRequired");
internal static string IdentityReference_IdentifierAuthorityTooLarge => GetResourceString("IdentityReference_IdentifierAuthorityTooLarge");
internal static string IdentityReference_IdentityNotMapped => GetResourceString("IdentityReference_IdentityNotMapped");
internal static string IdentityReference_InvalidNumberOfSubauthorities => GetResourceString("IdentityReference_InvalidNumberOfSubauthorities");
internal static string IdentityReference_InvalidSidRevision => GetResourceString("IdentityReference_InvalidSidRevision");
internal static string IdentityReference_MustBeIdentityReference => GetResourceString("IdentityReference_MustBeIdentityReference");
internal static string IdentityReference_NotAWindowsDomain => GetResourceString("IdentityReference_NotAWindowsDomain");
internal static string PlatformNotSupported_Principal => GetResourceString("PlatformNotSupported_Principal");
private static bool UsingResourceKeys()
{
return s_usingResourceKeys;
}
internal static string GetResourceString(string resourceKey, string defaultString = null)
{
if (UsingResourceKeys())
{
return defaultString ?? resourceKey;
}
string text = null;
try
{
text = ResourceManager.GetString(resourceKey);
}
catch (MissingManifestResourceException)
{
}
if (defaultString != null && resourceKey.Equals(text))
{
return defaultString;
}
return text;
}
internal static string Format(string resourceFormat, object p1)
{
if (UsingResourceKeys())
{
return string.Join(", ", resourceFormat, p1);
}
return string.Format(resourceFormat, p1);
}
internal static string Format(string resourceFormat, object p1, object p2)
{
if (UsingResourceKeys())
{
return string.Join(", ", resourceFormat, p1, p2);
}
return string.Format(resourceFormat, p1, p2);
}
internal static string Format(string resourceFormat, object p1, object p2, object p3)
{
if (UsingResourceKeys())
{
return string.Join(", ", resourceFormat, p1, p2, p3);
}
return string.Format(resourceFormat, p1, p2, p3);
}
internal static string Format(string resourceFormat, params object[] args)
{
if (args != null)
{
if (UsingResourceKeys())
{
return resourceFormat + ", " + string.Join(", ", args);
}
return string.Format(resourceFormat, args);
}
return resourceFormat;
}
internal static string Format(IFormatProvider provider, string resourceFormat, object p1)
{
if (UsingResourceKeys())
{
return string.Join(", ", resourceFormat, p1);
}
return string.Format(provider, resourceFormat, p1);
}
internal static string Format(IFormatProvider provider, string resourceFormat, object p1, object p2)
{
if (UsingResourceKeys())
{
return string.Join(", ", resourceFormat, p1, p2);
}
return string.Format(provider, resourceFormat, p1, p2);
}
internal static string Format(IFormatProvider provider, string resourceFormat, object p1, object p2, object p3)
{
if (UsingResourceKeys())
{
return string.Join(", ", resourceFormat, p1, p2, p3);
}
return string.Format(provider, resourceFormat, p1, p2, p3);
}
internal static string Format(IFormatProvider provider, string resourceFormat, params object[] args)
{
if (args != null)
{
if (UsingResourceKeys())
{
return resourceFormat + ", " + string.Join(", ", args);
}
return string.Format(provider, resourceFormat, args);
}
return resourceFormat;
}
}
}
namespace System.Security.Principal
{
public sealed class IdentityNotMappedException : SystemException
{
public IdentityReferenceCollection UnmappedIdentities
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public IdentityNotMappedException()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public IdentityNotMappedException(string? message)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public IdentityNotMappedException(string? message, Exception? inner)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public abstract class IdentityReference
{
public abstract string Value { get; }
internal IdentityReference()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public abstract override bool Equals(object? o);
public abstract override int GetHashCode();
public abstract bool IsValidTargetType(Type targetType);
public static bool operator ==(IdentityReference? left, IdentityReference? right)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static bool operator !=(IdentityReference? left, IdentityReference? right)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public abstract override string ToString();
public abstract IdentityReference Translate(Type targetType);
}
public class IdentityReferenceCollection : ICollection<IdentityReference>, IEnumerable<IdentityReference>, IEnumerable
{
public int Count
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public IdentityReference this[int index]
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
set
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
bool ICollection<IdentityReference>.IsReadOnly
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public IdentityReferenceCollection()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public IdentityReferenceCollection(int capacity)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public void Add(IdentityReference identity)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public void Clear()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public bool Contains(IdentityReference identity)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public void CopyTo(IdentityReference[] array, int offset)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public IEnumerator<IdentityReference> GetEnumerator()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public bool Remove(IdentityReference identity)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
IEnumerator IEnumerable.GetEnumerator()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public IdentityReferenceCollection Translate(Type targetType)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public IdentityReferenceCollection Translate(Type targetType, bool forceSuccess)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public sealed class NTAccount : IdentityReference
{
public override string Value
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public NTAccount(string name)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public NTAccount(string domainName, string accountName)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override bool Equals(object? o)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override int GetHashCode()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override bool IsValidTargetType(Type targetType)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static bool operator ==(NTAccount? left, NTAccount? right)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static bool operator !=(NTAccount? left, NTAccount? right)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override string ToString()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override IdentityReference Translate(Type targetType)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public sealed class SecurityIdentifier : IdentityReference, IComparable<SecurityIdentifier>
{
public static readonly int MaxBinaryLength;
public static readonly int MinBinaryLength;
public SecurityIdentifier? AccountDomainSid
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public int BinaryLength
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public override string Value
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public SecurityIdentifier(byte[] binaryForm, int offset)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public SecurityIdentifier(IntPtr binaryForm)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public SecurityIdentifier(WellKnownSidType sidType, SecurityIdentifier? domainSid)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public SecurityIdentifier(string sddlForm)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public int CompareTo(SecurityIdentifier? sid)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override bool Equals(object? o)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public bool Equals(SecurityIdentifier sid)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override int GetHashCode()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public bool IsAccountSid()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public bool IsEqualDomainSid(SecurityIdentifier sid)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override bool IsValidTargetType(Type targetType)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public bool IsWellKnown(WellKnownSidType type)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static bool operator ==(SecurityIdentifier? left, SecurityIdentifier? right)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static bool operator !=(SecurityIdentifier? left, SecurityIdentifier? right)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override string ToString()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override IdentityReference Translate(Type targetType)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
[Flags]
public enum TokenAccessLevels
{
AssignPrimary = 1,
Duplicate = 2,
Impersonate = 4,
Query = 8,
QuerySource = 0x10,
AdjustPrivileges = 0x20,
AdjustGroups = 0x40,
AdjustDefault = 0x80,
AdjustSessionId = 0x100,
Read = 0x20008,
Write = 0x200E0,
AllAccess = 0xF01FF,
MaximumAllowed = 0x2000000
}
public enum WellKnownSidType
{
NullSid = 0,
WorldSid = 1,
LocalSid = 2,
CreatorOwnerSid = 3,
CreatorGroupSid = 4,
CreatorOwnerServerSid = 5,
CreatorGroupServerSid = 6,
NTAuthoritySid = 7,
DialupSid = 8,
NetworkSid = 9,
BatchSid = 10,
InteractiveSid = 11,
ServiceSid = 12,
AnonymousSid = 13,
ProxySid = 14,
EnterpriseControllersSid = 15,
SelfSid = 16,
AuthenticatedUserSid = 17,
RestrictedCodeSid = 18,
TerminalServerSid = 19,
RemoteLogonIdSid = 20,
LogonIdsSid = 21,
LocalSystemSid = 22,
LocalServiceSid = 23,
NetworkServiceSid = 24,
BuiltinDomainSid = 25,
BuiltinAdministratorsSid = 26,
BuiltinUsersSid = 27,
BuiltinGuestsSid = 28,
BuiltinPowerUsersSid = 29,
BuiltinAccountOperatorsSid = 30,
BuiltinSystemOperatorsSid = 31,
BuiltinPrintOperatorsSid = 32,
BuiltinBackupOperatorsSid = 33,
BuiltinReplicatorSid = 34,
BuiltinPreWindows2000CompatibleAccessSid = 35,
BuiltinRemoteDesktopUsersSid = 36,
BuiltinNetworkConfigurationOperatorsSid = 37,
AccountAdministratorSid = 38,
AccountGuestSid = 39,
AccountKrbtgtSid = 40,
AccountDomainAdminsSid = 41,
AccountDomainUsersSid = 42,
AccountDomainGuestsSid = 43,
AccountComputersSid = 44,
AccountControllersSid = 45,
AccountCertAdminsSid = 46,
AccountSchemaAdminsSid = 47,
AccountEnterpriseAdminsSid = 48,
AccountPolicyAdminsSid = 49,
AccountRasAndIasServersSid = 50,
NtlmAuthenticationSid = 51,
DigestAuthenticationSid = 52,
SChannelAuthenticationSid = 53,
ThisOrganizationSid = 54,
OtherOrganizationSid = 55,
BuiltinIncomingForestTrustBuildersSid = 56,
BuiltinPerformanceMonitoringUsersSid = 57,
BuiltinPerformanceLoggingUsersSid = 58,
BuiltinAuthorizationAccessSid = 59,
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This member has been deprecated and is only maintained for backwards compatability. WellKnownSidType values greater than MaxDefined may be defined in future releases.")]
MaxDefined = 60,
WinBuiltinTerminalServerLicenseServersSid = 60,
WinBuiltinDCOMUsersSid = 61,
WinBuiltinIUsersSid = 62,
WinIUserSid = 63,
WinBuiltinCryptoOperatorsSid = 64,
WinUntrustedLabelSid = 65,
WinLowLabelSid = 66,
WinMediumLabelSid = 67,
WinHighLabelSid = 68,
WinSystemLabelSid = 69,
WinWriteRestrictedCodeSid = 70,
WinCreatorOwnerRightsSid = 71,
WinCacheablePrincipalsGroupSid = 72,
WinNonCacheablePrincipalsGroupSid = 73,
WinEnterpriseReadonlyControllersSid = 74,
WinAccountReadonlyControllersSid = 75,
WinBuiltinEventLogReadersGroup = 76,
WinNewEnterpriseReadonlyControllersSid = 77,
WinBuiltinCertSvcDComAccessGroup = 78,
WinMediumPlusLabelSid = 79,
WinLocalLogonSid = 80,
WinConsoleLogonSid = 81,
WinThisOrganizationCertificateSid = 82,
WinApplicationPackageAuthoritySid = 83,
WinBuiltinAnyPackageSid = 84,
WinCapabilityInternetClientSid = 85,
WinCapabilityInternetClientServerSid = 86,
WinCapabilityPrivateNetworkClientServerSid = 87,
WinCapabilityPicturesLibrarySid = 88,
WinCapabilityVideosLibrarySid = 89,
WinCapabilityMusicLibrarySid = 90,
WinCapabilityDocumentsLibrarySid = 91,
WinCapabilitySharedUserCertificatesSid = 92,
WinCapabilityEnterpriseAuthenticationSid = 93,
WinCapabilityRemovableStorageSid = 94
}
public enum WindowsAccountType
{
Normal,
Guest,
System,
Anonymous
}
public enum WindowsBuiltInRole
{
Administrator = 544,
User,
Guest,
PowerUser,
AccountOperator,
SystemOperator,
PrintOperator,
BackupOperator,
Replicator
}
public class WindowsIdentity : ClaimsIdentity, IDisposable, IDeserializationCallback, ISerializable
{
public new const string DefaultIssuer = "AD AUTHORITY";
public SafeAccessTokenHandle AccessToken
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public sealed override string? AuthenticationType
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public override IEnumerable<Claim> Claims
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public virtual IEnumerable<Claim> DeviceClaims
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public IdentityReferenceCollection? Groups
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public TokenImpersonationLevel ImpersonationLevel
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public virtual bool IsAnonymous
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public override bool IsAuthenticated
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public virtual bool IsGuest
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public virtual bool IsSystem
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public override string Name
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public SecurityIdentifier? Owner
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public virtual IntPtr Token
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public SecurityIdentifier? User
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public virtual IEnumerable<Claim> UserClaims
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public WindowsIdentity(IntPtr userToken)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public WindowsIdentity(IntPtr userToken, string type)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public WindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public WindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType, bool isAuthenticated)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public WindowsIdentity(SerializationInfo info, StreamingContext context)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
protected WindowsIdentity(WindowsIdentity identity)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public WindowsIdentity(string sUserPrincipalName)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override ClaimsIdentity Clone()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public void Dispose()
{
}
protected virtual void Dispose(bool disposing)
{
}
public static WindowsIdentity GetAnonymous()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static WindowsIdentity GetCurrent()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static WindowsIdentity? GetCurrent(bool ifImpersonating)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static void RunImpersonated(SafeAccessTokenHandle safeAccessTokenHandle, Action action)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static Task RunImpersonatedAsync(SafeAccessTokenHandle safeAccessTokenHandle, Func<Task> func)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static Task<T> RunImpersonatedAsync<T>(SafeAccessTokenHandle safeAccessTokenHandle, Func<Task<T>> func)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public static T RunImpersonated<T>(SafeAccessTokenHandle safeAccessTokenHandle, Func<T> func)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
void IDeserializationCallback.OnDeserialization(object sender)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public class WindowsPrincipal : ClaimsPrincipal
{
public virtual IEnumerable<Claim> DeviceClaims
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public override IIdentity Identity
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public virtual IEnumerable<Claim> UserClaims
{
get
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public WindowsPrincipal(WindowsIdentity ntIdentity)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public virtual bool IsInRole(int rid)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public virtual bool IsInRole(SecurityIdentifier sid)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public virtual bool IsInRole(WindowsBuiltInRole role)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
public override bool IsInRole(string role)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
}
namespace System.Runtime.Versioning
{
internal abstract class OSPlatformAttribute : Attribute
{
public string PlatformName { get; }
private protected OSPlatformAttribute(string platformName)
{
PlatformName = platformName;
}
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
internal sealed class TargetPlatformAttribute : OSPlatformAttribute
{
public TargetPlatformAttribute(string platformName)
: base(platformName)
{
}
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event, AllowMultiple = true, Inherited = false)]
internal sealed class SupportedOSPlatformAttribute : OSPlatformAttribute
{
public SupportedOSPlatformAttribute(string platformName)
: base(platformName)
{
}
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event, AllowMultiple = true, Inherited = false)]
internal sealed class UnsupportedOSPlatformAttribute : OSPlatformAttribute
{
public UnsupportedOSPlatformAttribute(string platformName)
: base(platformName)
{
}
}
}
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
internal sealed class AllowNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
internal sealed class DisallowNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)]
internal sealed class MaybeNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)]
internal sealed class NotNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
internal sealed class MaybeNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public MaybeNullWhenAttribute(bool returnValue)
{
ReturnValue = returnValue;
}
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
internal sealed class NotNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public NotNullWhenAttribute(bool returnValue)
{
ReturnValue = returnValue;
}
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
internal sealed class NotNullIfNotNullAttribute : Attribute
{
public string ParameterName { get; }
public NotNullIfNotNullAttribute(string parameterName)
{
ParameterName = parameterName;
}
}
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
internal sealed class DoesNotReturnAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
internal sealed class DoesNotReturnIfAttribute : Attribute
{
public bool ParameterValue { get; }
public DoesNotReturnIfAttribute(bool parameterValue)
{
ParameterValue = parameterValue;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
internal sealed class MemberNotNullAttribute : Attribute
{
public string[] Members { get; }
public MemberNotNullAttribute(string member)
{
Members = new string[1] { member };
}
public MemberNotNullAttribute(params string[] members)
{
Members = members;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
internal sealed class MemberNotNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public string[] Members { get; }
public MemberNotNullWhenAttribute(bool returnValue, string member)
{
ReturnValue = returnValue;
Members = new string[1] { member };
}
public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
{
ReturnValue = returnValue;
Members = members;
}
}
}