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; } }); } }
public FubuRegistry() { var type = GetType(); if (type == typeof(FubuRegistry) || type == typeof(FubuPackageRegistry)) { _applicationAssembly = TypePool.FindTheCallingAssembly(); } else { _applicationAssembly = type.Assembly; } _config = new ConfigGraph(_applicationAssembly); }
public void WriteTo(ConfigGraph ConfigGraph) { _actions.Each(x => x(ConfigGraph)); }
/// <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); }