private Control GetConfigurationControl(WebPartTransformer transformer) { Control configurationControl = transformer.CreateConfigurationControl(); if (configurationControl == null) { return null; } if (configurationControl is ITransformerConfigurationControl) { string configControlTypeName = configurationControl.GetType().AssemblyQualifiedName; if (_pendingTransformerConfigurationControlTypeName != null && _pendingTransformerConfigurationControlTypeName != configControlTypeName) { DisplayConnectionError(); return null; } else { _pendingTransformerConfigurationControlTypeName = configControlTypeName; return configurationControl; } } else { throw new InvalidOperationException(SR.GetString(SR.ConnectionsZone_MustImplementITransformerConfigurationControl)); } }
private bool HasConfigurationControl(WebPartTransformer transformer) { return (transformer.CreateConfigurationControl() != null); }
private Control GetConfigurationControl(WebPartTransformer transformer) { Control control = transformer.CreateConfigurationControl(); if (control == null) { return null; } if (!(control is ITransformerConfigurationControl)) { throw new InvalidOperationException(System.Web.SR.GetString("ConnectionsZone_MustImplementITransformerConfigurationControl")); } string assemblyQualifiedName = control.GetType().AssemblyQualifiedName; if ((this._pendingTransformerConfigurationControlTypeName != null) && (this._pendingTransformerConfigurationControlTypeName != assemblyQualifiedName)) { this.DisplayConnectionError(); return null; } this._pendingTransformerConfigurationControlTypeName = assemblyQualifiedName; return control; }