internal static EnhancedTimeSpan GetTimespanValueFromMultivaluedProperty(string name, IEnumerable <string> property, EnhancedTimeSpan defaultValue) { string stringValueFromMultivaluedProperty = MultivaluedPropertyAccessors.GetStringValueFromMultivaluedProperty(name, property, null); if (string.IsNullOrEmpty(stringValueFromMultivaluedProperty)) { return(defaultValue); } EnhancedTimeSpan result; if (EnhancedTimeSpan.TryParse(stringValueFromMultivaluedProperty, out result)) { return(result); } return(defaultValue); }
internal static Version GetVersionValueFromMultivaluedProperty(string name, IEnumerable <string> property, Version defaultValue) { string stringValueFromMultivaluedProperty = MultivaluedPropertyAccessors.GetStringValueFromMultivaluedProperty(name, property, null); if (string.IsNullOrEmpty(stringValueFromMultivaluedProperty)) { return(defaultValue); } Version result; if (Version.TryParse(stringValueFromMultivaluedProperty, out result)) { return(result); } return(defaultValue); }
internal static ByteQuantifiedSize GetByteQuantifiedValueFromMultivaluedProperty(string name, IEnumerable <string> property, ByteQuantifiedSize defaultValue) { string stringValueFromMultivaluedProperty = MultivaluedPropertyAccessors.GetStringValueFromMultivaluedProperty(name, property, null); if (string.IsNullOrEmpty(stringValueFromMultivaluedProperty)) { return(defaultValue); } ByteQuantifiedSize result; if (ByteQuantifiedSize.TryParse(stringValueFromMultivaluedProperty, out result)) { return(result); } return(defaultValue); }
internal static int GetIntValueFromMultivaluedProperty(string name, IEnumerable <string> property, int defaultValue) { string stringValueFromMultivaluedProperty = MultivaluedPropertyAccessors.GetStringValueFromMultivaluedProperty(name, property, null); if (string.IsNullOrEmpty(stringValueFromMultivaluedProperty)) { return(defaultValue); } int result; if (int.TryParse(stringValueFromMultivaluedProperty, out result)) { return(result); } return(defaultValue); }
internal static void TransportRuleRegexValidationTimeoutSetter(object value, IPropertyBag propertyBag) { MultivaluedPropertyAccessors.UpdateMultivaluedProperty <EnhancedTimeSpan>((EnhancedTimeSpan)value, TransportConfigContainerSchema.TransportRuleRegexValidationTimeout.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig]); }
internal static void TransportRuleAttachmentTextScanLimitSetter(object value, IPropertyBag propertyBag) { MultivaluedPropertyAccessors.UpdateMultivaluedProperty <ByteQuantifiedSize>((ByteQuantifiedSize)value, TransportConfigContainerSchema.TransportRuleAttachmentTextScanLimit.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig]); }
internal static object TransportRuleRegexValidationTimeoutGetter(IPropertyBag propertyBag) { return(MultivaluedPropertyAccessors.GetTimespanValueFromMultivaluedProperty(TransportConfigContainerSchema.TransportRuleRegexValidationTimeout.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig], (EnhancedTimeSpan)TransportConfigContainerSchema.TransportRuleRegexValidationTimeout.DefaultValue)); }
internal static object TransportRuleAttachmentTextScanLimitGetter(IPropertyBag propertyBag) { return(MultivaluedPropertyAccessors.GetByteQuantifiedValueFromMultivaluedProperty(TransportConfigContainerSchema.TransportRuleAttachmentTextScanLimit.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig], (ByteQuantifiedSize)TransportConfigContainerSchema.TransportRuleAttachmentTextScanLimit.DefaultValue)); }
internal static void TransportRuleLimitSetter(object value, IPropertyBag propertyBag) { MultivaluedPropertyAccessors.UpdateMultivaluedProperty <int>((int)value, TransportConfigContainerSchema.TransportRuleLimit.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig]); }
internal static object TransportRuleLimitGetter(IPropertyBag propertyBag) { return(MultivaluedPropertyAccessors.GetIntValueFromMultivaluedProperty(TransportConfigContainerSchema.TransportRuleLimit.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig], (int)TransportConfigContainerSchema.TransportRuleLimit.DefaultValue)); }
internal static void TransportRuleMinProductVersionSetter(object value, IPropertyBag propertyBag) { MultivaluedPropertyAccessors.UpdateMultivaluedProperty <Version>((Version)value, TransportConfigContainerSchema.TransportRuleMinProductVersion.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig]); }
internal static object TransportRuleMinProductVersionGetter(IPropertyBag propertyBag) { return(MultivaluedPropertyAccessors.GetVersionValueFromMultivaluedProperty(TransportConfigContainerSchema.TransportRuleMinProductVersion.Name, (MultiValuedProperty <string>)propertyBag[TransportConfigContainerSchema.TransportRuleConfig], (Version)TransportConfigContainerSchema.TransportRuleMinProductVersion.DefaultValue)); }