ClearPropertyDescriptors() protected method

protected ClearPropertyDescriptors ( ) : void
return void
        public override void ResetValue(object component)
        {
            DbConnectionStringBuilder builder = component as DbConnectionStringBuilder;

            if (builder != null)
            {
                builder.Remove(this.DisplayName);
                if (this.RefreshOnChange)
                {
                    builder.ClearPropertyDescriptors();
                }
            }
        }
Beispiel #2
0
        public override void ResetValue(object component)
        {
            DbConnectionStringBuilder builder = (component as DbConnectionStringBuilder);

            if (null != builder)
            {
                builder.Remove(DisplayName);

                if (RefreshOnChange)
                {
                    builder.ClearPropertyDescriptors();
                }
            }
        }
        public override void SetValue(object component, object value)
        {
            DbConnectionStringBuilder builder = component as DbConnectionStringBuilder;

            if (builder != null)
            {
                if ((typeof(string) == this.PropertyType) && string.Empty.Equals(value))
                {
                    value = null;
                }
                builder[this.DisplayName] = value;
                if (this.RefreshOnChange)
                {
                    builder.ClearPropertyDescriptors();
                }
            }
        }
Beispiel #4
0
        public override void SetValue(object component, object value)
        {
            DbConnectionStringBuilder builder = (component as DbConnectionStringBuilder);

            if (null != builder)
            {
                // via the editor, empty string does a defacto Reset
                if ((typeof(string) == PropertyType) && String.Empty.Equals(value))
                {
                    value = null;
                }
                builder[DisplayName] = value;

                if (RefreshOnChange)
                {
                    builder.ClearPropertyDescriptors();
                }
            }
        }