public override void Make(IConfigurationType config, IExpressionsManager manager) { if (null == config) { throw new ArgumentNullException("config"); } IConfigurationElement element = config as IConfigurationElement; if (null == element) { throw new ArgumentException("config must be an IConfigurationElement"); } if (element.Elements.ContainsKey("source")) { IConfigurationElement sourceElement = element.GetElementReference("source"); if (sourceElement.Attributes.ContainsKey("id")) { if (null == manager) { throw new ArgumentNullException("manager"); } this.Source = manager.FindControl(sourceElement.GetAttributeReference("id").Value.ToString()); if (null == this.Source) { this.Source = sourceElement.GetAttributeReference("id").Value; } if (sourceElement.Attributes.ContainsKey("member")) { this.Member = sourceElement.GetAttributeReference("member").Value.ToString(); } } else { if (sourceElement.Attributes.ContainsKey("value")) { this.Source = sourceElement.GetAttributeReference("value").Value; } } } }
public override void Make(IConfigurationType config, IExpressionsManager manager) { if (null == config) throw new ArgumentNullException("config"); IConfigurationElement element = config as IConfigurationElement; if (null == element) throw new ArgumentException("config must be an IConfigurationElement"); if (element.Elements.ContainsKey("source")) { IConfigurationElement sourceElement = element.GetElementReference("source"); if (sourceElement.Attributes.ContainsKey("id")) { if (null == manager) throw new ArgumentNullException("manager"); this.Source = manager.FindControl(sourceElement.GetAttributeReference("id").Value.ToString()); if (null == this.Source) this.Source = sourceElement.GetAttributeReference("id").Value; if (sourceElement.Attributes.ContainsKey("member")) this.Member = sourceElement.GetAttributeReference("member").Value.ToString(); } else { if (sourceElement.Attributes.ContainsKey("value")) this.Source = sourceElement.GetAttributeReference("value").Value; } } }