Exemplo n.º 1
0
 //============================================================
 // <T>追加类的转储信息。</T>
 //
 // @param dump 转储信息
 // @param level 转储级别
 // @param refer 引用对象
 //============================================================
 public static void AppendClass(FString dump, EDumpLevel level, object refer)
 {
     if (level >= EDumpLevel.Normal)
     {
         RClass.Dump(dump, refer);
         dump.Append(' ');
     }
 }
Exemplo n.º 2
0
        public void LinkInterfaces(FAopComponentBuilder builder)
        {
            XAopComponent  xcomponent = builder.Component;
            FAopDescriptor descriptor = xcomponent.Descriptor;

            if (descriptor.HasLinker)
            {
                foreach (FAopLinker linker in descriptor.Linkers.Values)
                {
                    // Find
                    object find = null;
                    if (builder.Faces.Contains(linker.Face.FullName))
                    {
                        find = builder.Faces[linker.Face.FullName];
                    }
                    else
                    {
                        find = _components.Find(linker.Face.Type);
                        builder.Faces[linker.Face.FullName] = find;
                    }
                    // Check
                    if (find == null)
                    {
                        if (_logger.WarnAble)
                        {
                            _logger.Warn(this, "LinkInterfaces", "Linker instance is null. {0}", linker.Name);
                        }
                    }
                    else
                    {
                        if (_logger.DebugAble)
                        {
                            _logger.Debug(this, "LinkInterfaces", "Set linker {0} = {1}", linker.Name, RClass.Dump(find));
                        }
                        linker.Field.SetValue(builder.Instance, find);
                    }
                }
            }
        }