示例#1
0
        public LogSearchResponseModel(Data.Query query, List <Elmah.Net.Logger.Data.LogMessage> list, List <Elmah.Net.Logger.Data.Filter> filters, HydrationLevel level = HydrationLevel.Basic) : this()
        {
            this.Query        = query;
            this.Logs         = list.Where(x => x.Log != null).Select(x => x.Log).Distinct().Select(y => new LogObject(y)).ToList();
            this.Applications = list.Where(x => x.Application != null).Select(x => x.Application).Distinct().Select(y => new LogObject(y)).ToList();
            this.Users        = list.Where(x => x.User != null).Select(x => x.User).Distinct().Select(y => new LogObject(y)).ToList();
            this.Types        = list.Where(x => x.MessageType != null).Select(x => x.MessageType).Distinct().Select(y => new LogObject(y)).ToList();
            this.Sources      = list.Where(x => x.Source != null).Select(x => x.Source).Distinct().Select(y => new LogObject(y)).ToList();
            this.Severities   = list.Select(x => x.Severity).Distinct().Select(y => new LogObject {
                Id = 0, Name = y.ToString()
            }).ToList();
            this.Spans = EnumHelper.GetValues <Elmah.Net.Logger.Data.SearchSpan>().Select(y => new LogObject(y)).ToList();

            // load messages
            foreach (var item in list)
            {
                this.Messages.Add(new LogMessage(item));
            }

            if (filters != null)
            {
                // load filters
                foreach (var item in filters)
                {
                    this.Filters.Add(new Filter(item));
                }
            }
        }
示例#2
0
 public Filter(Elmah.Net.Logger.Data.Filter obj) : this()
 {
     this.Id           = obj.Id;
     this.Name         = obj.Name;
     this.Title        = obj.Title;
     this.Description  = obj.Description;
     this.Distribution = obj.Distribution;
     this.Query        = obj.Query;
 }
示例#3
0
        object IInvokeServiceOps.InvokeServiceOperation(int opCode, object[] args)
        {
            MobiusTargetAssayService op = (MobiusTargetAssayService)opCode;

            switch (op)
            {
            case MobiusTargetAssayService.GetTargetDescriptionUrl:
            {
                string url            = "";
                string targetIdSymbol = (string)args[0];
                url = Qel.TargetAssayMetaBroker.GetTargetDescriptionUrl(targetIdSymbol);
                return(url);
            }

            case MobiusTargetAssayService.BuildTargetAssayListQuery:
            {
                string     geneSymbol      = (string)args[0];
                Data.Query query           = Qel.TargetAssayMetaBroker.BuildTargetAssayListQuery(geneSymbol);
                string     serializedQuery = query.Serialize();
                return(serializedQuery);
            }

            default:                     // other methods below not implemented
                throw new NotImplementedException();
            }

            //  case MobiusTargetAssayService.BuildTargetAssayUnsummarizedDataQuery:
            //    {
            //      string geneSymbol = (string)args[0];
            //      Data.Query query = Qel.TargetAssayMetaBroker.BuildTargetAssayUnsummarizedDataQuery(geneSymbol);
            //      string serializedQuery = query.Serialize();
            //      return serializedQuery;
            //    }
            //  case MobiusTargetAssayService.BuildTargetAssaySummarizedDataQuery:
            //    {
            //      string geneSymbol = (string)args[0];
            //      Data.Query query = Qel.TargetAssayMetaBroker.BuildTargetAssaySummarizedDataQuery(geneSymbol);
            //      string serializedQuery = query.Serialize();
            //      return serializedQuery;
            //    }
            //  case MobiusTargetAssayService.UpdateCommonAssayAttributes:
            //    {
            //      string dir = (string)args[0];
            //      MetaFactoryNamespace.TargetAssayMetaFactory metaFactory =
            //          new Mobius.MetaFactoryNamespace.TargetAssayMetaFactory();
            //      string response = metaFactory.UpdateCommonAssayAttributes(dir);
            //      return response;
            //    }

            //return null;
        }
示例#4
0
 public Filter()
 {
     this.Query = new Data.Query();
 }