/// <summary> /// Adds hierarchy tools. /// </summary> /// <param name="services">IServiceCollection</param> /// <param name="setupAction">Action to configure settings.</param> /// <returns>IServiceCollection</returns> public static IServiceCollection AddHierarchyToolsForStringId <T>(this IServiceCollection services, Action <HierarchyOptions> setupAction) where T : class, IHierarchyItem <T, string, string> { var settings = new HierarchyOptions(); setupAction(settings); services.AddSingleton(settings); services.AddSingleton <IHierarchyTools <T, string, string>, HierarchyToolsForStringId <T> >(); return(services); }
public HierarchyToolsForIntId(HierarchyOptions options) { _options = options; }
public HierarchyToolsForStringId(HierarchyOptions options) { _options = options; }