public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { if (value.GetType() == typeof(string)) { ZipExclusion exclusion = new ZipExclusion(); string[] vals = ((string)value).Split(new char[] { ':' }); if (vals.Length == 2) { exclusion.ExclusionType = vals[0] == "File" ? ExclusionType.File : ExclusionType.Folder; exclusion.Expression = vals[1]; } return exclusion; } return base.ConvertFrom(context, culture, value); }
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { if (value.GetType() == typeof(string)) { ZipExclusion exclusion = new ZipExclusion(); string[] vals = ((string)value).Split(new char[] { ':' }); if (vals.Length == 2) { exclusion.ExclusionType = vals[0] == "File" ? ExclusionType.File : ExclusionType.Folder; exclusion.Expression = vals[1]; } return(exclusion); } return(base.ConvertFrom(context, culture, value)); }