// 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); /// /// More than one parameter and/or property is bound to the HTTP request's content. /// internal static string MultipleBodyParametersOrPropertiesAreNotAllowed { get { return GetString("MultipleBodyParametersOrPropertiesAreNotAllowed"); } } /// /// More than one parameter and/or property is bound to the HTTP request's content. /// internal static string FormatMultipleBodyParametersOrPropertiesAreNotAllowed() { return GetString("MultipleBodyParametersOrPropertiesAreNotAllowed"); } /// /// Value cannot be null or empty. /// internal static string ArgumentCannotBeNullOrEmpty { get { return GetString("ArgumentCannotBeNullOrEmpty"); } } /// /// Value cannot be null or empty. /// internal static string FormatArgumentCannotBeNullOrEmpty() { return GetString("ArgumentCannotBeNullOrEmpty"); } /// /// A value is required. /// internal static string KeyValuePair_BothKeyAndValueMustBePresent { get { return GetString("KeyValuePair_BothKeyAndValueMustBePresent"); } } /// /// A value is required. /// internal static string FormatKeyValuePair_BothKeyAndValueMustBePresent() { return GetString("KeyValuePair_BothKeyAndValueMustBePresent"); } /// /// 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 parameter '{0}' could not be found. /// internal static string Common_ParameterNotFound { get { return GetString("Common_ParameterNotFound"); } } /// /// The parameter '{0}' could not be found. /// internal static string FormatCommon_ParameterNotFound(object p0) { return string.Format(CultureInfo.CurrentCulture, GetString("Common_ParameterNotFound"), p0); } /// /// 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"); } /// /// 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}' does not implement the interface '{1}'. /// internal static string PropertyBindingPredicateProvider_WrongType { get { return GetString("PropertyBindingPredicateProvider_WrongType"); } } /// /// The type '{0}' does not implement the interface '{1}'. /// internal static string FormatPropertyBindingPredicateProvider_WrongType(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("PropertyBindingPredicateProvider_WrongType"), 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 field previously marked invalid should not be marked skipped. /// internal static string Validation_InvalidFieldCannotBeReset_ToSkipped { get { return GetString("Validation_InvalidFieldCannotBeReset_ToSkipped"); } } /// /// A field previously marked invalid should not be marked skipped. /// internal static string FormatValidation_InvalidFieldCannotBeReset_ToSkipped() { return GetString("Validation_InvalidFieldCannotBeReset_ToSkipped"); } /// /// 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 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); } /// /// {0} has a DisplayColumn attribute for {1}, but property {1} does not exist. /// internal static string DataAnnotationsModelMetadataProvider_UnknownProperty { get { return GetString("DataAnnotationsModelMetadataProvider_UnknownProperty"); } } /// /// {0} has a DisplayColumn attribute for {1}, but property {1} does not exist. /// internal static string FormatDataAnnotationsModelMetadataProvider_UnknownProperty(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("DataAnnotationsModelMetadataProvider_UnknownProperty"), p0, p1); } /// /// {0} has a DisplayColumn attribute for {1}, but property {1} does not have a public 'get' method. /// internal static string DataAnnotationsModelMetadataProvider_UnreadableProperty { get { return GetString("DataAnnotationsModelMetadataProvider_UnreadableProperty"); } } /// /// {0} has a DisplayColumn attribute for {1}, but property {1} does not have a public 'get' method. /// internal static string FormatDataAnnotationsModelMetadataProvider_UnreadableProperty(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("DataAnnotationsModelMetadataProvider_UnreadableProperty"), p0, p1); } /// /// The maximum number of allowed model errors has been reached. /// internal static string ModelStateDictionary_MaxModelStateErrors { get { return GetString("ModelStateDictionary_MaxModelStateErrors"); } } /// /// The maximum number of allowed model errors has been reached. /// internal static string FormatModelStateDictionary_MaxModelStateErrors() { return GetString("ModelStateDictionary_MaxModelStateErrors"); } /// /// The type '{0}' must implement either '{1}' or '{2}' to be used as a model binder. /// internal static string BinderType_MustBeIModelBinderOrIModelBinderProvider { get { return GetString("BinderType_MustBeIModelBinderOrIModelBinderProvider"); } } /// /// The type '{0}' must implement either '{1}' or '{2}' to be used as a model binder. /// internal static string FormatBinderType_MustBeIModelBinderOrIModelBinderProvider(object p0, object p1, object p2) { return string.Format(CultureInfo.CurrentCulture, GetString("BinderType_MustBeIModelBinderOrIModelBinderProvider"), p0, p1, p2); } /// /// The value '{0}' is not valid for {1}. /// internal static string ModelBinderUtil_ValueInvalid { get { return GetString("ModelBinderUtil_ValueInvalid"); } } /// /// The value '{0}' is not valid for {1}. /// internal static string FormatModelBinderUtil_ValueInvalid(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("ModelBinderUtil_ValueInvalid"), p0, p1); } /// /// The supplied value is invalid for {0}. /// internal static string ModelBinderUtil_ValueInvalidGeneric { get { return GetString("ModelBinderUtil_ValueInvalidGeneric"); } } /// /// The supplied value is invalid for {0}. /// internal static string FormatModelBinderUtil_ValueInvalidGeneric(object p0) { return string.Format(CultureInfo.CurrentCulture, GetString("ModelBinderUtil_ValueInvalidGeneric"), p0); } /// /// Body /// internal static string BindingSource_Body { get { return GetString("BindingSource_Body"); } } /// /// Body /// internal static string FormatBindingSource_Body() { return GetString("BindingSource_Body"); } /// /// Custom /// internal static string BindingSource_Custom { get { return GetString("BindingSource_Custom"); } } /// /// Custom /// internal static string FormatBindingSource_Custom() { return GetString("BindingSource_Custom"); } /// /// Form /// internal static string BindingSource_Form { get { return GetString("BindingSource_Form"); } } /// /// Form /// internal static string FormatBindingSource_Form() { return GetString("BindingSource_Form"); } /// /// Header /// internal static string BindingSource_Header { get { return GetString("BindingSource_Header"); } } /// /// Header /// internal static string FormatBindingSource_Header() { return GetString("BindingSource_Header"); } /// /// Services /// internal static string BindingSource_Services { get { return GetString("BindingSource_Services"); } } /// /// Services /// internal static string FormatBindingSource_Services() { return GetString("BindingSource_Services"); } /// /// ModelBinding /// internal static string BindingSource_ModelBinding { get { return GetString("BindingSource_ModelBinding"); } } /// /// ModelBinding /// internal static string FormatBindingSource_ModelBinding() { return GetString("BindingSource_ModelBinding"); } /// /// Path /// internal static string BindingSource_Path { get { return GetString("BindingSource_Path"); } } /// /// Path /// internal static string FormatBindingSource_Path() { return GetString("BindingSource_Path"); } /// /// Query /// internal static string BindingSource_Query { get { return GetString("BindingSource_Query"); } } /// /// Query /// internal static string FormatBindingSource_Query() { return GetString("BindingSource_Query"); } /// /// The provided binding source '{0}' is a composite. '{1}' requires that the source must represent a single type of input. /// internal static string BindingSource_CannotBeComposite { get { return GetString("BindingSource_CannotBeComposite"); } } /// /// The provided binding source '{0}' is a composite. '{1}' requires that the source must represent a single type of input. /// internal static string FormatBindingSource_CannotBeComposite(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_CannotBeComposite"), p0, p1); } /// /// The provided binding source '{0}' is not a request-based binding source. '{1}' requires that the source must represent data from an HTTP request. /// internal static string BindingSource_MustBeFromRequest { get { return GetString("BindingSource_MustBeFromRequest"); } } /// /// The provided binding source '{0}' is not a request-based binding source. '{1}' requires that the source must represent data from an HTTP request. /// internal static string FormatBindingSource_MustBeFromRequest(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_MustBeFromRequest"), p0, p1); } /// /// The provided binding source '{0}' is a greedy data source. '{1}' does not support greedy data sources. /// internal static string BindingSource_CannotBeGreedy { get { return GetString("BindingSource_CannotBeGreedy"); } } /// /// The provided binding source '{0}' is a greedy data source. '{1}' does not support greedy data sources. /// internal static string FormatBindingSource_CannotBeGreedy(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_CannotBeGreedy"), p0, p1); } /// /// The provided binding source '{0}' is not a greedy data source. '{1}' only supports greedy data sources. /// internal static string BindingSource_MustBeGreedy { get { return GetString("BindingSource_MustBeGreedy"); } } /// /// The provided binding source '{0}' is not a greedy data source. '{1}' only supports greedy data sources. /// internal static string FormatBindingSource_MustBeGreedy(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_MustBeGreedy"), 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; } } }