public BlockType(Adress id) { this.Id = id; this.Checker = null; this.Generator = null; this.generatorExternal = null; this.checkerExternal = null; }
public bool SetGenerator(IExternalMethod method) { if (this.generator_external == null) { this.generator_external = method; return(true); } return(false); }
public bool SetCheker(IExternalMethod external) { if (this.Checker != null) { return(false); } this.checkerExternal = external; this.Checker = this.ExternalCheck; return(true); }
public bool SetGenerator(IExternalMethod external) { if (this.Generator != null) { return(false); } this.generatorExternal = external; this.Generator = this.ExternalGenerate; return(true); }
protected bool LoadXml_MethodSection(XElement element) { Tag tag = new Tag(); tag.LoadXml(element); List <XElement> generator = tag.GetChildren(Alist.Constant.Xml.Assembly.Tag); if (generator.Count > 1) { this.generator_external = new ExternalMethod(null); generator.ForEach(x => this.generator_external.LoadXml(x)); } return(true); }
public bool LoadXml(XElement element) { Alist.Xml.Tag tag = new Alist.Xml.Tag(); tag.LoadXml(element); if (this.checkerExternal == null) { this.checkerExternal = (new ExternalMethod(null)); } if (this.generatorExternal == null) { this.generatorExternal = (new ExternalMethod(null)); } List <XElement> method = tag.GetChildren (this.checkerExternal.NameXml); method.AddRange(tag.GetChildren (this.generatorExternal.NameXml)); for (int i = 0; i < method.Count; i++) { Alist.Xml.Tag methodTag = new Alist.Xml.Tag(); methodTag.LoadXml(method[i]); string attribute = methodTag.GetAttribute (Constant.Xml.BlockType.MethodAttribute); if (attribute.ToLower() == Constant.Xml.BlockType.MethodAttributeChecker) { this.checkerExternal.LoadXml(method[i]); } if (attribute.ToLower() == Constant.Xml.BlockType.MethodAttributeGenerator) { this.generatorExternal.LoadXml(method[i]); } } this.Id = new Adress (tag.GetAttribute(Constant.Xml.BlockType.IdAttribute)); return(true); }
protected bool LoadXml_MethodSection(XElement element) { Tag tag = new Tag(); tag.LoadXml(element); List<XElement> generator = tag.GetChildren(Alist.Constant.Xml.Assembly.Tag); if (generator.Count > 1) { this.generator_external = new ExternalMethod(null); generator.ForEach(x => this.generator_external.LoadXml(x)); } return true; }
public bool SetGenerator(IExternalMethod method) { if (this.generator_external == null) { this.generator_external = method; return true; } return false; }