Cleanup resx (#1424)

This commit is contained in:
Hao Kung 2017-09-14 10:59:59 -07:00 committed by GitHub
parent a53bf093a7
commit 863846bb2a
9 changed files with 50 additions and 100 deletions

View File

@ -15,16 +15,14 @@ namespace Microsoft.AspNetCore.Authentication.Facebook
/// </summary> /// </summary>
internal static string Exception_OptionMustBeProvided internal static string Exception_OptionMustBeProvided
{ {
get { return GetString("Exception_OptionMustBeProvided"); } get => GetString("Exception_OptionMustBeProvided");
} }
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string FormatException_OptionMustBeProvided(object p0) internal static string FormatException_OptionMustBeProvided(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,32 +15,28 @@ namespace Microsoft.AspNetCore.Authentication.Google
/// </summary> /// </summary>
internal static string Exception_OptionMustBeProvided internal static string Exception_OptionMustBeProvided
{ {
get { return GetString("Exception_OptionMustBeProvided"); } get => GetString("Exception_OptionMustBeProvided");
} }
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string FormatException_OptionMustBeProvided(object p0) internal static string FormatException_OptionMustBeProvided(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
}
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string Exception_ValidatorHandlerMismatch internal static string Exception_ValidatorHandlerMismatch
{ {
get { return GetString("Exception_ValidatorHandlerMismatch"); } get => GetString("Exception_ValidatorHandlerMismatch");
} }
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string FormatException_ValidatorHandlerMismatch() internal static string FormatException_ValidatorHandlerMismatch()
{ => GetString("Exception_ValidatorHandlerMismatch");
return GetString("Exception_ValidatorHandlerMismatch");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,32 +15,28 @@ namespace Microsoft.AspNetCore.Authentication.JwtBearer
/// </summary> /// </summary>
internal static string Exception_OptionMustBeProvided internal static string Exception_OptionMustBeProvided
{ {
get { return GetString("Exception_OptionMustBeProvided"); } get => GetString("Exception_OptionMustBeProvided");
} }
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string FormatException_OptionMustBeProvided(object p0) internal static string FormatException_OptionMustBeProvided(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
}
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string Exception_ValidatorHandlerMismatch internal static string Exception_ValidatorHandlerMismatch
{ {
get { return GetString("Exception_ValidatorHandlerMismatch"); } get => GetString("Exception_ValidatorHandlerMismatch");
} }
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string FormatException_ValidatorHandlerMismatch() internal static string FormatException_ValidatorHandlerMismatch()
{ => GetString("Exception_ValidatorHandlerMismatch");
return GetString("Exception_ValidatorHandlerMismatch");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,48 +15,42 @@ namespace Microsoft.AspNetCore.Authentication.MicrosoftAccount
/// </summary> /// </summary>
internal static string Exception_MissingId internal static string Exception_MissingId
{ {
get { return GetString("Exception_MissingId"); } get => GetString("Exception_MissingId");
} }
/// <summary> /// <summary>
/// The user does not have an id. /// The user does not have an id.
/// </summary> /// </summary>
internal static string FormatException_MissingId() internal static string FormatException_MissingId()
{ => GetString("Exception_MissingId");
return GetString("Exception_MissingId");
}
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string Exception_OptionMustBeProvided internal static string Exception_OptionMustBeProvided
{ {
get { return GetString("Exception_OptionMustBeProvided"); } get => GetString("Exception_OptionMustBeProvided");
} }
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string FormatException_OptionMustBeProvided(object p0) internal static string FormatException_OptionMustBeProvided(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
}
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string Exception_ValidatorHandlerMismatch internal static string Exception_ValidatorHandlerMismatch
{ {
get { return GetString("Exception_ValidatorHandlerMismatch"); } get => GetString("Exception_ValidatorHandlerMismatch");
} }
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string FormatException_ValidatorHandlerMismatch() internal static string FormatException_ValidatorHandlerMismatch()
{ => GetString("Exception_ValidatorHandlerMismatch");
return GetString("Exception_ValidatorHandlerMismatch");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,32 +15,28 @@ namespace Microsoft.AspNetCore.Authentication.OAuth
/// </summary> /// </summary>
internal static string Exception_OptionMustBeProvided internal static string Exception_OptionMustBeProvided
{ {
get { return GetString("Exception_OptionMustBeProvided"); } get => GetString("Exception_OptionMustBeProvided");
} }
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string FormatException_OptionMustBeProvided(object p0) internal static string FormatException_OptionMustBeProvided(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
}
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string Exception_ValidatorHandlerMismatch internal static string Exception_ValidatorHandlerMismatch
{ {
get { return GetString("Exception_ValidatorHandlerMismatch"); } get => GetString("Exception_ValidatorHandlerMismatch");
} }
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string FormatException_ValidatorHandlerMismatch() internal static string FormatException_ValidatorHandlerMismatch()
{ => GetString("Exception_ValidatorHandlerMismatch");
return GetString("Exception_ValidatorHandlerMismatch");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,96 +15,84 @@ namespace Microsoft.AspNetCore.Authentication.OpenIdConnect
/// </summary> /// </summary>
internal static string MessageStateIsNullOrEmpty internal static string MessageStateIsNullOrEmpty
{ {
get { return GetString("MessageStateIsNullOrEmpty"); } get => GetString("MessageStateIsNullOrEmpty");
} }
/// <summary> /// <summary>
/// OpenIdConnectAuthenticationHandler: message.State is null or empty. /// OpenIdConnectAuthenticationHandler: message.State is null or empty.
/// </summary> /// </summary>
internal static string FormatMessageStateIsNullOrEmpty() internal static string FormatMessageStateIsNullOrEmpty()
{ => GetString("MessageStateIsNullOrEmpty");
return GetString("MessageStateIsNullOrEmpty");
}
/// <summary> /// <summary>
/// Unable to unprotect the message.State. /// Unable to unprotect the message.State.
/// </summary> /// </summary>
internal static string MessageStateIsInvalid internal static string MessageStateIsInvalid
{ {
get { return GetString("MessageStateIsInvalid"); } get => GetString("MessageStateIsInvalid");
} }
/// <summary> /// <summary>
/// Unable to unprotect the message.State. /// Unable to unprotect the message.State.
/// </summary> /// </summary>
internal static string FormatMessageStateIsInvalid() internal static string FormatMessageStateIsInvalid()
{ => GetString("MessageStateIsInvalid");
return GetString("MessageStateIsInvalid");
}
/// <summary> /// <summary>
/// Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'. /// Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.
/// </summary> /// </summary>
internal static string MessageContainsError internal static string MessageContainsError
{ {
get { return GetString("MessageContainsError"); } get => GetString("MessageContainsError");
} }
/// <summary> /// <summary>
/// Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'. /// Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.
/// </summary> /// </summary>
internal static string FormatMessageContainsError(object p0, object p1, object p2) internal static string FormatMessageContainsError(object p0, object p1, object p2)
{ => string.Format(CultureInfo.CurrentCulture, GetString("MessageContainsError"), p0, p1, p2);
return string.Format(CultureInfo.CurrentCulture, GetString("MessageContainsError"), p0, p1, p2);
}
/// <summary> /// <summary>
/// The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'. /// The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'.
/// </summary> /// </summary>
internal static string ValidatedSecurityTokenNotJwt internal static string ValidatedSecurityTokenNotJwt
{ {
get { return GetString("ValidatedSecurityTokenNotJwt"); } get => GetString("ValidatedSecurityTokenNotJwt");
} }
/// <summary> /// <summary>
/// The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'. /// The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'.
/// </summary> /// </summary>
internal static string FormatValidatedSecurityTokenNotJwt(object p0) internal static string FormatValidatedSecurityTokenNotJwt(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("ValidatedSecurityTokenNotJwt"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("ValidatedSecurityTokenNotJwt"), p0);
}
/// <summary> /// <summary>
/// Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'." /// Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."
/// </summary> /// </summary>
internal static string UnableToValidateToken internal static string UnableToValidateToken
{ {
get { return GetString("UnableToValidateToken"); } get => GetString("UnableToValidateToken");
} }
/// <summary> /// <summary>
/// Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'." /// Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."
/// </summary> /// </summary>
internal static string FormatUnableToValidateToken(object p0) internal static string FormatUnableToValidateToken(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("UnableToValidateToken"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("UnableToValidateToken"), p0);
}
/// <summary> /// <summary>
/// Cannot process the message. Both id_token and code are missing. /// Cannot process the message. Both id_token and code are missing.
/// </summary> /// </summary>
internal static string IdTokenCodeMissing internal static string IdTokenCodeMissing
{ {
get { return GetString("IdTokenCodeMissing"); } get => GetString("IdTokenCodeMissing");
} }
/// <summary> /// <summary>
/// Cannot process the message. Both id_token and code are missing. /// Cannot process the message. Both id_token and code are missing.
/// </summary> /// </summary>
internal static string FormatIdTokenCodeMissing() internal static string FormatIdTokenCodeMissing()
{ => GetString("IdTokenCodeMissing");
return GetString("IdTokenCodeMissing");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,32 +15,28 @@ namespace Microsoft.AspNetCore.Authentication.Twitter
/// </summary> /// </summary>
internal static string Exception_OptionMustBeProvided internal static string Exception_OptionMustBeProvided
{ {
get { return GetString("Exception_OptionMustBeProvided"); } get => GetString("Exception_OptionMustBeProvided");
} }
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string FormatException_OptionMustBeProvided(object p0) internal static string FormatException_OptionMustBeProvided(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
}
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string Exception_ValidatorHandlerMismatch internal static string Exception_ValidatorHandlerMismatch
{ {
get { return GetString("Exception_ValidatorHandlerMismatch"); } get => GetString("Exception_ValidatorHandlerMismatch");
} }
/// <summary> /// <summary>
/// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler. /// An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
/// </summary> /// </summary>
internal static string FormatException_ValidatorHandlerMismatch() internal static string FormatException_ValidatorHandlerMismatch()
{ => GetString("Exception_ValidatorHandlerMismatch");
return GetString("Exception_ValidatorHandlerMismatch");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,64 +15,56 @@ namespace Microsoft.AspNetCore.Authentication
/// </summary> /// </summary>
internal static string Exception_DefaultDpapiRequiresAppNameKey internal static string Exception_DefaultDpapiRequiresAppNameKey
{ {
get { return GetString("Exception_DefaultDpapiRequiresAppNameKey"); } get => GetString("Exception_DefaultDpapiRequiresAppNameKey");
} }
/// <summary> /// <summary>
/// The default data protection provider may only be used when the IApplicationBuilder.Properties contains an appropriate 'host.AppName' key. /// The default data protection provider may only be used when the IApplicationBuilder.Properties contains an appropriate 'host.AppName' key.
/// </summary> /// </summary>
internal static string FormatException_DefaultDpapiRequiresAppNameKey() internal static string FormatException_DefaultDpapiRequiresAppNameKey()
{ => GetString("Exception_DefaultDpapiRequiresAppNameKey");
return GetString("Exception_DefaultDpapiRequiresAppNameKey");
}
/// <summary> /// <summary>
/// The state passed to UnhookAuthentication may only be the return value from HookAuthentication. /// The state passed to UnhookAuthentication may only be the return value from HookAuthentication.
/// </summary> /// </summary>
internal static string Exception_UnhookAuthenticationStateType internal static string Exception_UnhookAuthenticationStateType
{ {
get { return GetString("Exception_UnhookAuthenticationStateType"); } get => GetString("Exception_UnhookAuthenticationStateType");
} }
/// <summary> /// <summary>
/// The state passed to UnhookAuthentication may only be the return value from HookAuthentication. /// The state passed to UnhookAuthentication may only be the return value from HookAuthentication.
/// </summary> /// </summary>
internal static string FormatException_UnhookAuthenticationStateType() internal static string FormatException_UnhookAuthenticationStateType()
{ => GetString("Exception_UnhookAuthenticationStateType");
return GetString("Exception_UnhookAuthenticationStateType");
}
/// <summary> /// <summary>
/// The AuthenticationTokenProvider's required synchronous events have not been registered. /// The AuthenticationTokenProvider's required synchronous events have not been registered.
/// </summary> /// </summary>
internal static string Exception_AuthenticationTokenDoesNotProvideSyncMethods internal static string Exception_AuthenticationTokenDoesNotProvideSyncMethods
{ {
get { return GetString("Exception_AuthenticationTokenDoesNotProvideSyncMethods"); } get => GetString("Exception_AuthenticationTokenDoesNotProvideSyncMethods");
} }
/// <summary> /// <summary>
/// The AuthenticationTokenProvider's required synchronous events have not been registered. /// The AuthenticationTokenProvider's required synchronous events have not been registered.
/// </summary> /// </summary>
internal static string FormatException_AuthenticationTokenDoesNotProvideSyncMethods() internal static string FormatException_AuthenticationTokenDoesNotProvideSyncMethods()
{ => GetString("Exception_AuthenticationTokenDoesNotProvideSyncMethods");
return GetString("Exception_AuthenticationTokenDoesNotProvideSyncMethods");
}
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string Exception_OptionMustBeProvided internal static string Exception_OptionMustBeProvided
{ {
get { return GetString("Exception_OptionMustBeProvided"); } get => GetString("Exception_OptionMustBeProvided");
} }
/// <summary> /// <summary>
/// The '{0}' option must be provided. /// The '{0}' option must be provided.
/// </summary> /// </summary>
internal static string FormatException_OptionMustBeProvided(object p0) internal static string FormatException_OptionMustBeProvided(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_OptionMustBeProvided"), p0);
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -15,48 +15,42 @@ namespace Microsoft.AspNetCore.Authorization
/// </summary> /// </summary>
internal static string Exception_AuthorizationPolicyEmpty internal static string Exception_AuthorizationPolicyEmpty
{ {
get { return GetString("Exception_AuthorizationPolicyEmpty"); } get => GetString("Exception_AuthorizationPolicyEmpty");
} }
/// <summary> /// <summary>
/// AuthorizationPolicy must have at least one requirement. /// AuthorizationPolicy must have at least one requirement.
/// </summary> /// </summary>
internal static string FormatException_AuthorizationPolicyEmpty() internal static string FormatException_AuthorizationPolicyEmpty()
{ => GetString("Exception_AuthorizationPolicyEmpty");
return GetString("Exception_AuthorizationPolicyEmpty");
}
/// <summary> /// <summary>
/// The AuthorizationPolicy named: '{0}' was not found. /// The AuthorizationPolicy named: '{0}' was not found.
/// </summary> /// </summary>
internal static string Exception_AuthorizationPolicyNotFound internal static string Exception_AuthorizationPolicyNotFound
{ {
get { return GetString("Exception_AuthorizationPolicyNotFound"); } get => GetString("Exception_AuthorizationPolicyNotFound");
} }
/// <summary> /// <summary>
/// The AuthorizationPolicy named: '{0}' was not found. /// The AuthorizationPolicy named: '{0}' was not found.
/// </summary> /// </summary>
internal static string FormatException_AuthorizationPolicyNotFound(object p0) internal static string FormatException_AuthorizationPolicyNotFound(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("Exception_AuthorizationPolicyNotFound"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("Exception_AuthorizationPolicyNotFound"), p0);
}
/// <summary> /// <summary>
/// At least one role must be specified. /// At least one role must be specified.
/// </summary> /// </summary>
internal static string Exception_RoleRequirementEmpty internal static string Exception_RoleRequirementEmpty
{ {
get { return GetString("Exception_RoleRequirementEmpty"); } get => GetString("Exception_RoleRequirementEmpty");
} }
/// <summary> /// <summary>
/// At least one role must be specified. /// At least one role must be specified.
/// </summary> /// </summary>
internal static string FormatException_RoleRequirementEmpty() internal static string FormatException_RoleRequirementEmpty()
{ => GetString("Exception_RoleRequirementEmpty");
return GetString("Exception_RoleRequirementEmpty");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {