public void Link(FieldInfo field) { _name = field.Name; _field = field; _face = RClass.Find(field.FieldType); if (!_face.Type.IsInterface) { throw new FFatalException("Linker must is interface. ({0}={1})", _name, _face.Type.FullName); } }
//============================================================ // <T>加载设置信息。</T> // // @param config 设置信息 //============================================================ public void LoadConfig(FXmlNode config) { // 获得名称 _name = config[PTY_NAME]; RString.CheckEmpty(_name, "name"); // 获得类型 _typeName = config[PTY_TYPE]; RString.CheckEmpty(_typeName, "type"); // 获得类对象 _type = RClass.Find(_typeName); }
public FType FindType(string name) { int count = Count; for (int n = count - 1; n >= 0; n--) { Type type = Get(n).LinkAssembly.GetType(name); if (type != null) { return(RClass.Find(type)); } } throw new FFatalException("Can't find reference type [{0}]", name); }
public override void LoadConfig(FXmlNode config) { // Name _name = config[PTY_NAME]; RString.CheckEmpty(_name, "name"); // Type _typeName = config[PTY_TYPE]; RString.CheckEmpty(_typeName, "typeName"); _linkType = _console.FindType(_typeName); // Collection if (config.Contains(PTY_COLLECTION)) { _collectionName = config[PTY_COLLECTION]; RString.CheckEmpty(_collectionName, "collectionName"); _linkCollection = _console.FindType(_collectionName); } else { _linkCollection = RClass.Find(typeof(XAopNodeCollection <IAopNode>)); _collectionName = _linkCollection.Type.FullName; } }
public void LoadConfig(FXmlNode config) { _name = config[PTY_NAME]; _className = config[PTY_CLASS]; _class = RClass.Find(_className); }