Skip to content

Commit

Permalink
Annotate System.Security.Claims for nullable (dotnet#1431)
Browse files Browse the repository at this point in the history
* Annotate System.Security.Claims for nullable
  • Loading branch information
buyaa-n authored Jan 12, 2020
1 parent afc21e5 commit 130e184
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 139 deletions.
80 changes: 40 additions & 40 deletions src/libraries/System.Security.Claims/ref/System.Security.Claims.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,71 +10,71 @@ namespace System.Security.Claims
public partial class Claim
{
public Claim(System.IO.BinaryReader reader) { }
public Claim(System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity subject) { }
public Claim(System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity? subject) { }
protected Claim(System.Security.Claims.Claim other) { }
protected Claim(System.Security.Claims.Claim other, System.Security.Claims.ClaimsIdentity subject) { }
protected Claim(System.Security.Claims.Claim other, System.Security.Claims.ClaimsIdentity? subject) { }
public Claim(string type, string value) { }
public Claim(string type, string value, string valueType) { }
public Claim(string type, string value, string valueType, string issuer) { }
public Claim(string type, string value, string valueType, string issuer, string originalIssuer) { }
public Claim(string type, string value, string valueType, string issuer, string originalIssuer, System.Security.Claims.ClaimsIdentity subject) { }
protected virtual byte[] CustomSerializationData { get { throw null; } }
public Claim(string type, string value, string? valueType) { }
public Claim(string type, string value, string? valueType, string? issuer) { }
public Claim(string type, string value, string? valueType, string? issuer, string? originalIssuer) { }
public Claim(string type, string value, string? valueType, string? issuer, string? originalIssuer, System.Security.Claims.ClaimsIdentity? subject) { }
protected virtual byte[]? CustomSerializationData { get { throw null; } }
public string Issuer { get { throw null; } }
public string OriginalIssuer { get { throw null; } }
public System.Collections.Generic.IDictionary<string, string> Properties { get { throw null; } }
public System.Security.Claims.ClaimsIdentity Subject { get { throw null; } }
public System.Collections.Generic.IDictionary<string, string?> Properties { get { throw null; } }
public System.Security.Claims.ClaimsIdentity? Subject { get { throw null; } }
public string Type { get { throw null; } }
public string Value { get { throw null; } }
public string ValueType { get { throw null; } }
public virtual System.Security.Claims.Claim Clone() { throw null; }
public virtual System.Security.Claims.Claim Clone(System.Security.Claims.ClaimsIdentity identity) { throw null; }
public virtual System.Security.Claims.Claim Clone(System.Security.Claims.ClaimsIdentity? identity) { throw null; }
public override string ToString() { throw null; }
public virtual void WriteTo(System.IO.BinaryWriter writer) { }
protected virtual void WriteTo(System.IO.BinaryWriter writer, byte[] userData) { }
protected virtual void WriteTo(System.IO.BinaryWriter writer, byte[]? userData) { }
}
public partial class ClaimsIdentity : System.Security.Principal.IIdentity
{
public const string DefaultIssuer = "LOCAL AUTHORITY";
public const string DefaultNameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name";
public const string DefaultRoleClaimType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role";
public ClaimsIdentity() { }
public ClaimsIdentity(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims) { }
public ClaimsIdentity(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, string authenticationType) { }
public ClaimsIdentity(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, string authenticationType, string nameType, string roleType) { }
public ClaimsIdentity(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>? claims) { }
public ClaimsIdentity(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>? claims, string? authenticationType) { }
public ClaimsIdentity(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>? claims, string? authenticationType, string? nameType, string? roleType) { }
public ClaimsIdentity(System.IO.BinaryReader reader) { }
protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info) { }
protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
protected ClaimsIdentity(System.Security.Claims.ClaimsIdentity other) { }
public ClaimsIdentity(System.Security.Principal.IIdentity identity) { }
public ClaimsIdentity(System.Security.Principal.IIdentity identity, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims) { }
public ClaimsIdentity(System.Security.Principal.IIdentity identity, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, string authenticationType, string nameType, string roleType) { }
public ClaimsIdentity(string authenticationType) { }
public ClaimsIdentity(string authenticationType, string nameType, string roleType) { }
public System.Security.Claims.ClaimsIdentity Actor { get { throw null; } set { } }
public virtual string AuthenticationType { get { throw null; } }
public object BootstrapContext { get { throw null; } set { } }
public ClaimsIdentity(System.Security.Principal.IIdentity? identity) { }
public ClaimsIdentity(System.Security.Principal.IIdentity? identity, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>? claims) { }
public ClaimsIdentity(System.Security.Principal.IIdentity? identity, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>? claims, string? authenticationType, string? nameType, string? roleType) { }
public ClaimsIdentity(string? authenticationType) { }
public ClaimsIdentity(string? authenticationType, string? nameType, string? roleType) { }
public System.Security.Claims.ClaimsIdentity? Actor { get { throw null; } set { } }
public virtual string? AuthenticationType { get { throw null; } }
public object? BootstrapContext { get { throw null; } set { } }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> Claims { get { throw null; } }
protected virtual byte[] CustomSerializationData { get { throw null; } }
protected virtual byte[]? CustomSerializationData { get { throw null; } }
public virtual bool IsAuthenticated { get { throw null; } }
public string Label { get { throw null; } set { } }
public virtual string Name { get { throw null; } }
public string? Label { get { throw null; } set { } }
public virtual string? Name { get { throw null; } }
public string NameClaimType { get { throw null; } }
public string RoleClaimType { get { throw null; } }
public virtual void AddClaim(System.Security.Claims.Claim claim) { }
public virtual void AddClaims(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims) { }
public virtual void AddClaims(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim?> claims) { }
public virtual System.Security.Claims.ClaimsIdentity Clone() { throw null; }
protected virtual System.Security.Claims.Claim CreateClaim(System.IO.BinaryReader reader) { throw null; }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll(string type) { throw null; }
public virtual System.Security.Claims.Claim FindFirst(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual System.Security.Claims.Claim FindFirst(string type) { throw null; }
public virtual System.Security.Claims.Claim? FindFirst(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual System.Security.Claims.Claim? FindFirst(string type) { throw null; }
protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public virtual bool HasClaim(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual bool HasClaim(string type, string value) { throw null; }
public virtual void RemoveClaim(System.Security.Claims.Claim claim) { }
public virtual bool TryRemoveClaim(System.Security.Claims.Claim claim) { throw null; }
public virtual void RemoveClaim(System.Security.Claims.Claim? claim) { }
public virtual bool TryRemoveClaim(System.Security.Claims.Claim? claim) { throw null; }
public virtual void WriteTo(System.IO.BinaryWriter writer) { }
protected virtual void WriteTo(System.IO.BinaryWriter writer, byte[] userData) { }
protected virtual void WriteTo(System.IO.BinaryWriter writer, byte[]? userData) { }
}
public partial class ClaimsPrincipal : System.Security.Principal.IPrincipal
{
Expand All @@ -86,25 +86,25 @@ public ClaimsPrincipal(System.Security.Principal.IIdentity identity) { }
public ClaimsPrincipal(System.Security.Principal.IPrincipal principal) { }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> Claims { get { throw null; } }
public static System.Func<System.Security.Claims.ClaimsPrincipal> ClaimsPrincipalSelector { get { throw null; } set { } }
public static System.Security.Claims.ClaimsPrincipal Current { get { throw null; } }
protected virtual byte[] CustomSerializationData { get { throw null; } }
public static System.Security.Claims.ClaimsPrincipal? Current { get { throw null; } }
protected virtual byte[]? CustomSerializationData { get { throw null; } }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.ClaimsIdentity> Identities { get { throw null; } }
public virtual System.Security.Principal.IIdentity Identity { get { throw null; } }
public static System.Func<System.Collections.Generic.IEnumerable<System.Security.Claims.ClaimsIdentity>, System.Security.Claims.ClaimsIdentity> PrimaryIdentitySelector { get { throw null; } set { } }
public virtual System.Security.Principal.IIdentity? Identity { get { throw null; } }
public static System.Func<System.Collections.Generic.IEnumerable<System.Security.Claims.ClaimsIdentity>, System.Security.Claims.ClaimsIdentity?> PrimaryIdentitySelector { get { throw null; } set { } }
public virtual void AddIdentities(System.Collections.Generic.IEnumerable<System.Security.Claims.ClaimsIdentity> identities) { }
public virtual void AddIdentity(System.Security.Claims.ClaimsIdentity identity) { }
public virtual System.Security.Claims.ClaimsPrincipal Clone() { throw null; }
protected virtual System.Security.Claims.ClaimsIdentity CreateClaimsIdentity(System.IO.BinaryReader reader) { throw null; }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll(string type) { throw null; }
public virtual System.Security.Claims.Claim FindFirst(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual System.Security.Claims.Claim FindFirst(string type) { throw null; }
public virtual System.Security.Claims.Claim? FindFirst(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual System.Security.Claims.Claim? FindFirst(string type) { throw null; }
protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public virtual bool HasClaim(System.Predicate<System.Security.Claims.Claim> match) { throw null; }
public virtual bool HasClaim(string type, string value) { throw null; }
public virtual bool IsInRole(string role) { throw null; }
public virtual void WriteTo(System.IO.BinaryWriter writer) { }
protected virtual void WriteTo(System.IO.BinaryWriter writer, byte[] userData) { }
protected virtual void WriteTo(System.IO.BinaryWriter writer, byte[]? userData) { }
}
public static partial class ClaimTypes
{
Expand Down Expand Up @@ -209,8 +209,8 @@ public GenericIdentity(string name, string type) { }
}
public partial class GenericPrincipal : System.Security.Claims.ClaimsPrincipal
{
public GenericPrincipal(System.Security.Principal.IIdentity identity, string[] roles) { }
public GenericPrincipal(System.Security.Principal.IIdentity identity, string[]? roles) { }
public override System.Security.Principal.IIdentity Identity { get { throw null; } }
public override bool IsInRole(string role) { throw null; }
public override bool IsInRole(string? role) { throw null; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configurations>$(NetCoreAppCurrent)-Debug;$(NetCoreAppCurrent)-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Claims.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<AssemblyName>System.Security.Claims</AssemblyName>
<Configurations>$(NetCoreAppCurrent)-Debug;$(NetCoreAppCurrent)-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Security\Claims\Claim.cs" />
Expand Down
Loading

0 comments on commit 130e184

Please sign in to comment.