public virtual IConfiguration CreateConfig() { VariableConfiguration <WCellVariableDefinition> variableConfiguration = new VariableConfiguration <WCellVariableDefinition>(OnError); variableConfiguration.FilePath = Path.Combine(Context.File.DirectoryName, GetType().Name + "Config.xml"); variableConfiguration.AddVariablesOfAsm <VariableAttribute>(GetType().Assembly); return(variableConfiguration); }
public virtual IConfiguration CreateConfig() { VariableConfiguration <WCellVariableDefinition> variableConfiguration = new VariableConfiguration <WCellVariableDefinition>(new Action <string>(WCellAddonBase.OnError)); variableConfiguration.FilePath = Path.Combine(this.Context.File.DirectoryName, this.GetType().Name + "Config.xml"); variableConfiguration.AddVariablesOfAsm <VariableAttribute>(this.GetType().Assembly); return((IConfiguration)variableConfiguration); }
protected WCellAddonBase() { config = new VariableConfiguration<WCellVariableDefinition>(OnError); var asm = GetType().Assembly; if (asm.Location == null) { OnError("Addon Assembly does not have a location. - Could not set Filename Configuration of: " + this.GetDefaultDescription()); } }