Exemplo n.º 1
0
        public FubuRegistry()
        {
            var type = GetType();

            _name = type.Name.Replace("TransportRegistry", "").Replace("Registry", "").ToLower();

            if (type == typeof(FubuRegistry) || type == typeof(FubuPackageRegistry))
            {
                _applicationAssembly = AssemblyFinder.FindTheCallingAssembly();
            }
            else
            {
                _applicationAssembly = type.Assembly;
            }

            _config = new ConfigGraph(_applicationAssembly);

            if (!this.GetType().CanBeCastTo <FubuPackageRegistry>())
            {
                // TODO: Hokey. Gotta be a better way to do this
                AlterSettings <ChannelGraph>(x =>
                {
                    if (x.Name.IsEmpty())
                    {
                        x.Name = _name;
                    }
                });
            }
        }
Exemplo n.º 2
0
        public FubuRegistry()
        {
            var type = GetType();

            if (type == typeof(FubuRegistry) || type == typeof(FubuPackageRegistry))
            {
                _applicationAssembly = TypePool.FindTheCallingAssembly();
            }
            else
            {
                _applicationAssembly = type.Assembly;
            }

            _config = new ConfigGraph(_applicationAssembly);
        }
Exemplo n.º 3
0
 public void WriteTo(ConfigGraph ConfigGraph)
 {
     _actions.Each(x => x(ConfigGraph));
 }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="assembly">The primary assembly for this application used in type scanning conventions and policies</param>
 public FubuRegistry(Assembly assembly)
 {
     _applicationAssembly = assembly;
     _config = new ConfigGraph(_applicationAssembly);
 }