Exemple #1
0
        public ComponentMetadataView(ComponentMetadata metadata, AnalysisViewSettings settings)
        {
            OriginalMetadata = metadata;

            ElasticType             = metadata.ElasticType;
            BaseClassTemplate       = metadata.BaseClass;
            JsonPartFuncReturnClass = metadata.JsonPartFuncReturnClass;
            CamelCaseType           = ElasticType.ToCamelCase();
            ClassName     = CamelCaseType + settings.ClassNameSuffix;
            ComponentType = settings.ComponentTypeEnum + "." + ElasticType;
            Description   = metadata.Description + "\nsee " + metadata.ReferenceUrl;

            Properties = (metadata.Properties ?? Enumerable.Empty <ComponentMetadataProperty>())
                         .Select(p => new ComponentMetadataPropertyView(p)).ToList();
        }
 public UserRepository(ExceptionlessElasticConfiguration configuration, IValidator<User> validator)
     : base(configuration.Organizations.User, validator) {
     FieldsRequiredForRemove.AddRange(new Field[] { ElasticType.GetPropertyName(u => u.EmailAddress), ElasticType.GetPropertyName(u => u.OrganizationIds) });
     DocumentsAdded.AddHandler(OnDocumentsAdded);
 }
Exemple #3
0
        public Task <FindResults <PersistentEvent> > GetByFilterAsync(ExceptionlessSystemFilter systemFilter, string userFilter, string sort, string field, DateTime utcStart, DateTime utcEnd, CommandOptionsDescriptor <PersistentEvent> options = null)
        {
            IRepositoryQuery <PersistentEvent> query = new RepositoryQuery <PersistentEvent>()
                                                       .DateRange(utcStart, utcEnd, field ?? ElasticType.GetFieldName(e => e.Date))
                                                       .Index(utcStart, utcEnd)
                                                       .SystemFilter(systemFilter)
                                                       .FilterExpression(userFilter);

            query = !String.IsNullOrEmpty(sort) ? query.SortExpression(sort) : query.SortDescending(e => e.Date);
            return(FindAsync(q => query, options));
        }
 protected void AddDefaultExclude(params Expression <Func <T, object> >[] objectPaths)
 {
     _defaultExcludes.AddRange(objectPaths.Select(o => new Lazy <Field>(() => ElasticType.GetPropertyName(o))));
 }
 protected void AddDefaultExclude(Expression <Func <T, object> > objectPath)
 {
     _defaultExcludes.Add(new Lazy <Field>(() => ElasticType.GetPropertyName(objectPath)));
 }