Exemplo n.º 1
0
        public static __Scope Load(IEnumerable <Assembly> assemblies)
        {
            var result = new __Scope(default(__Scope));

            foreach (var assembly in assemblies)
            {
                foreach (var type in assembly.GetTypes())
                {
                    if (type
                        .CustomAttributes
                        .Any(attr => attr.AttributeType == typeof(AutoInit)))
                    {
                        type.GetMethod("__init")
                        ?.Invoke(null, new object[] { result });
                    }
                }
            }

            return(result);
        }
Exemplo n.º 2
0
 public __Scope(__Scope parent)
 {
     _parent = parent;
 }