public HandlerStackItem(IEntityWithFacets entityWithFacets, bool doNotFollow, bool noModules) { this.BaseObject = entityWithFacets; this.DoNotFollow = doNotFollow; this.NoModules = noModules; this.Log = new List <HandlerStackLogItem>(); }
public HandlerStackItem(IEntityWithFacets entityWithFacets, string hierarchyItemName, string[] roles) { this.BaseObject = entityWithFacets; this.HierarchyItemName = hierarchyItemName; this.ViewLayoutHandlers = new List <IViewLayoutHandler>(); this.Roles = roles; this.Log = new List <HandlerStackLogItem>(); }
public static HandlerStackItem Create(IEntityWithFacets entityWithFacets, string hierarchyName, string[] roles, params IFacetHandler[] handlers) { if (handlers.Length == 1) { return(new SingleHandler(entityWithFacets, hierarchyName, roles, handlers.Single())); } else { return(new MultipleHandlers(entityWithFacets, hierarchyName, roles, handlers)); } }
public static bool CanFollowWithout(this IEntityWithFacets entityWithFacets) { var facets = entityWithFacets.Facets; var hasNavigationOrUI = facets.Any(f => f.Attribute is UINavigationAttribute || f.Attribute is UIAttribute); if (entityWithFacets is IEntityWithOptionalFacets) { var entityWithOptionalFacets = (IEntityWithOptionalFacets)entityWithFacets; if (entityWithOptionalFacets.FollowWithout) { hasNavigationOrUI = true; } } return(hasNavigationOrUI); }
public static HandlerStackItem Create(IEntityWithFacets entityWithFacets, string hierarchyName, string[] roles, IFacetHandler handler) { return(new SingleHandler(entityWithFacets, hierarchyName, roles, handler)); }
public MultipleHandlers(IEntityWithFacets entityWithFacets, string hierarchyName, string[] roles, IEnumerable <IFacetHandler> handlers) : base(entityWithFacets, hierarchyName, roles) { this.NoModules = !handlers.Any(h => h.FacetHandlerLayer == FacetHandlerLayer.Client); this.Handlers = handlers; }
public SingleHandler(IEntityWithFacets entityWithFacets, string hierarchyName, string[] roles, IFacetHandler handler) : base(entityWithFacets, hierarchyName, roles) { this.Handler = handler; }
public FollowHandler(IEntityWithFacets entityWithFacets, string reason) : base(entityWithFacets, false, true) { this.Reason = reason; this.StackTrace = this.GetStack().ToList(); }
public static bool HasUI(this IEntityWithFacets entityWithFacets) { var facets = entityWithFacets.Facets; return(facets.Any(f => f.Attribute is UIAttribute)); }