示例#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;
                    }
                });
            }
        }
示例#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);
        }
示例#3
0
 public void WriteTo(ConfigGraph ConfigGraph)
 {
     _actions.Each(x => x(ConfigGraph));
 }
示例#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);
 }