public AuditService() { _allProperties = new Lazy <IDictionary <Guid, IAuditProperty> >(() => EventKinds.SelectMany(k => k.Properties).Distinct().ToDictionary(p => p.ID)); _allEventKinds = new Lazy <IDictionary <Guid, AuditEventKind> >(() => EventKinds.ToDictionary(k => k.ID)); _filterFactories = new Lazy <ILookup <string, IAuditEventFilterFactory <TDomain> > >(() => FilterFactories.EmptyIfNull().ToLookup(f => f.Id.ToString(), StringComparer.InvariantCultureIgnoreCase)); }
public ActionResult GetSelector(string propertyId, string onChangeFunction) { var sel = from id in Maybe.ParseGuid(propertyId) from prop in EventKinds.SelectMany(k => k.Properties).FirstOrDefault(p => p.ID == id) from ui in RenderSelector(Composition, prop, null) select ui; if (sel.Kind == MaybeKind.Null) { return(HttpNotFound()); } return(View <Views.PropertyValueSelector>().WithModel(new Models.ValueSelectorModel { Selector = sel.Value, OnChangeFunction = onChangeFunction })); }