// namespace Microsoft.AspNet.Mvc.ModelBinding { using System.Globalization; using System.Reflection; using System.Resources; internal static class Resources { private static readonly ResourceManager _resourceManager = new ResourceManager("Microsoft.AspNet.Mvc.ModelBinding.Resources", typeof(Resources).GetTypeInfo().Assembly); /// /// The value cannot be null or empty. /// internal static string ArgumentCannotBeNullOrEmpty { get { return GetString("ArgumentCannotBeNullOrEmpty"); } } /// /// The value cannot be null or empty. /// internal static string FormatArgumentCannotBeNullOrEmpty() { return GetString("ArgumentCannotBeNullOrEmpty"); } /// /// The property {0}.{1} could not be found. /// internal static string Common_PropertyNotFound { get { return GetString("Common_PropertyNotFound"); } } /// /// The property {0}.{1} could not be found. /// internal static string FormatCommon_PropertyNotFound(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("Common_PropertyNotFound"), p0, p1); } /// /// The type '{0}' must have a public constructor which accepts a single parameter of type '{1}'. /// internal static string DataAnnotationsModelValidatorProvider_ConstructorRequirements { get { return GetString("DataAnnotationsModelValidatorProvider_ConstructorRequirements"); } } /// /// The type '{0}' must have a public constructor which accepts a single parameter of type '{1}'. /// internal static string FormatDataAnnotationsModelValidatorProvider_ConstructorRequirements(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("DataAnnotationsModelValidatorProvider_ConstructorRequirements"), p0, p1); } /// /// The key is invalid JQuery syntax because it is missing a closing bracket. /// internal static string JQuerySyntaxMissingClosingBracket { get { return GetString("JQuerySyntaxMissingClosingBracket"); } } /// /// The key is invalid JQuery syntax because it is missing a closing bracket. /// internal static string FormatJQuerySyntaxMissingClosingBracket() { return GetString("JQuerySyntaxMissingClosingBracket"); } /// /// No encoding found for input formatter '{0}'. There must be at least one supported encoding registered in order for the formatter to read content. /// internal static string MediaTypeFormatterNoEncoding { get { return GetString("MediaTypeFormatterNoEncoding"); } } /// /// No encoding found for input formatter '{0}'. There must be at least one supported encoding registered in order for the formatter to read content. /// internal static string FormatMediaTypeFormatterNoEncoding(object p0) { return string.Format(CultureInfo.CurrentCulture, GetString("MediaTypeFormatterNoEncoding"), p0); } /// /// Property '{0}' on type '{1}' is invalid. Value-typed properties marked as [Required] must also be marked with [DataMember(IsRequired=true)] to be recognized as required. Consider attributing the declaring type with [DataContract] and the property with [DataMember(IsRequired=true)]. /// internal static string MissingDataMemberIsRequired { get { return GetString("MissingDataMemberIsRequired"); } } /// /// Property '{0}' on type '{1}' is invalid. Value-typed properties marked as [Required] must also be marked with [DataMember(IsRequired=true)] to be recognized as required. Consider attributing the declaring type with [DataContract] and the property with [DataMember(IsRequired=true)]. /// internal static string FormatMissingDataMemberIsRequired(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("MissingDataMemberIsRequired"), p0, p1); } /// /// The '{0}' property is required. /// internal static string MissingRequiredMember { get { return GetString("MissingRequiredMember"); } } /// /// The '{0}' property is required. /// internal static string FormatMissingRequiredMember(object p0) { return string.Format(CultureInfo.CurrentCulture, GetString("MissingRequiredMember"), p0); } /// /// The value '{0}' is not valid for {1}. /// internal static string ModelBinderConfig_ValueInvalid { get { return GetString("ModelBinderConfig_ValueInvalid"); } } /// /// The value '{0}' is not valid for {1}. /// internal static string FormatModelBinderConfig_ValueInvalid(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ModelBinderConfig_ValueInvalid"), p0, p1); } /// /// A value is required. /// internal static string ModelBinderConfig_ValueRequired { get { return GetString("ModelBinderConfig_ValueRequired"); } } /// /// A value is required. /// internal static string FormatModelBinderConfig_ValueRequired() { return GetString("ModelBinderConfig_ValueRequired"); } /// /// The binding context has a null Model, but this binder requires a non-null model of type '{0}'. /// internal static string ModelBinderUtil_ModelCannotBeNull { get { return GetString("ModelBinderUtil_ModelCannotBeNull"); } } /// /// The binding context has a null Model, but this binder requires a non-null model of type '{0}'. /// internal static string FormatModelBinderUtil_ModelCannotBeNull(object p0) { return string.Format(CultureInfo.CurrentCulture, GetString("ModelBinderUtil_ModelCannotBeNull"), p0); } /// /// The binding context has a Model of type '{0}', but this binder can only operate on models of type '{1}'. /// internal static string ModelBinderUtil_ModelInstanceIsWrong { get { return GetString("ModelBinderUtil_ModelInstanceIsWrong"); } } /// /// The binding context has a Model of type '{0}', but this binder can only operate on models of type '{1}'. /// internal static string FormatModelBinderUtil_ModelInstanceIsWrong(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ModelBinderUtil_ModelInstanceIsWrong"), p0, p1); } /// /// The binding context cannot have a null ModelMetadata. /// internal static string ModelBinderUtil_ModelMetadataCannotBeNull { get { return GetString("ModelBinderUtil_ModelMetadataCannotBeNull"); } } /// /// The binding context cannot have a null ModelMetadata. /// internal static string FormatModelBinderUtil_ModelMetadataCannotBeNull() { return GetString("ModelBinderUtil_ModelMetadataCannotBeNull"); } /// /// The binding context has a ModelType of '{0}', but this binder can only operate on models of type '{1}'. /// internal static string ModelBinderUtil_ModelTypeIsWrong { get { return GetString("ModelBinderUtil_ModelTypeIsWrong"); } } /// /// The binding context has a ModelType of '{0}', but this binder can only operate on models of type '{1}'. /// internal static string FormatModelBinderUtil_ModelTypeIsWrong(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ModelBinderUtil_ModelTypeIsWrong"), p0, p1); } /// /// The ModelMetadata property must be set before accessing this property. /// internal static string ModelBindingContext_ModelMetadataMustBeSet { get { return GetString("ModelBindingContext_ModelMetadataMustBeSet"); } } /// /// The ModelMetadata property must be set before accessing this property. /// internal static string FormatModelBindingContext_ModelMetadataMustBeSet() { return GetString("ModelBindingContext_ModelMetadataMustBeSet"); } /// /// The type '{0}' must derive from '{1}'. /// internal static string TypeMustDeriveFromType { get { return GetString("TypeMustDeriveFromType"); } } /// /// The type '{0}' must derive from '{1}'. /// internal static string FormatTypeMustDeriveFromType(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("TypeMustDeriveFromType"), p0, p1); } /// /// The model object inside the metadata claimed to be compatible with '{0}', but was actually '{1}'. /// internal static string ValidatableObjectAdapter_IncompatibleType { get { return GetString("ValidatableObjectAdapter_IncompatibleType"); } } /// /// The model object inside the metadata claimed to be compatible with '{0}', but was actually '{1}'. /// internal static string FormatValidatableObjectAdapter_IncompatibleType(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ValidatableObjectAdapter_IncompatibleType"), p0, p1); } /// /// Field '{0}' on type '{1}' is attributed with one or more validation attributes. Validation attributes on fields are not supported. Consider using a public property for validation instead. /// internal static string ValidationAttributeOnField { get { return GetString("ValidationAttributeOnField"); } } /// /// Field '{0}' on type '{1}' is attributed with one or more validation attributes. Validation attributes on fields are not supported. Consider using a public property for validation instead. /// internal static string FormatValidationAttributeOnField(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ValidationAttributeOnField"), p0, p1); } /// /// Non-public property '{0}' on type '{1}' is attributed with one or more validation attributes. Validation attributes on non-public properties are not supported. Consider using a public property for validation instead. /// internal static string ValidationAttributeOnNonPublicProperty { get { return GetString("ValidationAttributeOnNonPublicProperty"); } } /// /// Non-public property '{0}' on type '{1}' is attributed with one or more validation attributes. Validation attributes on non-public properties are not supported. Consider using a public property for validation instead. /// internal static string FormatValidationAttributeOnNonPublicProperty(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ValidationAttributeOnNonPublicProperty"), p0, p1); } /// /// A field previously marked invalid should not be marked valid. /// internal static string Validation_InvalidFieldCannotBeReset { get { return GetString("Validation_InvalidFieldCannotBeReset"); } } /// /// A field previously marked invalid should not be marked valid. /// internal static string FormatValidation_InvalidFieldCannotBeReset() { return GetString("Validation_InvalidFieldCannotBeReset"); } /// /// A value is required but was not present in the request. /// internal static string Validation_ValueNotFound { get { return GetString("Validation_ValueNotFound"); } } /// /// A value is required but was not present in the request. /// internal static string FormatValidation_ValueNotFound() { return GetString("Validation_ValueNotFound"); } /// /// Cannot convert value '{0}' to enum type '{1}'. /// internal static string ValueProviderResult_CannotConvertEnum { get { return GetString("ValueProviderResult_CannotConvertEnum"); } } /// /// Cannot convert value '{0}' to enum type '{1}'. /// internal static string FormatValueProviderResult_CannotConvertEnum(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ValueProviderResult_CannotConvertEnum"), p0, p1); } /// /// The parameter conversion from type '{0}' to type '{1}' failed. See the inner exception for more information. /// internal static string ValueProviderResult_ConversionThrew { get { return GetString("ValueProviderResult_ConversionThrew"); } } /// /// The parameter conversion from type '{0}' to type '{1}' failed. See the inner exception for more information. /// internal static string FormatValueProviderResult_ConversionThrew(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ValueProviderResult_ConversionThrew"), p0, p1); } /// /// The parameter conversion from type '{0}' to type '{1}' failed because no type converter can convert between these types. /// internal static string ValueProviderResult_NoConverterExists { get { return GetString("ValueProviderResult_NoConverterExists"); } } /// /// The parameter conversion from type '{0}' to type '{1}' failed because no type converter can convert between these types. /// internal static string FormatValueProviderResult_NoConverterExists(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ValueProviderResult_NoConverterExists"), p0, p1); } private static string GetString(string name, params string[] formatterNames) { var value = _resourceManager.GetString(name); System.Diagnostics.Debug.Assert(value != null); if (formatterNames != null) { for (var i = 0; i < formatterNames.Length; i++) { value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); } } return value; } } }