Ejemplo n.º 1
0
    private List <MsgRequest> FormRequest()
    {
        List <MsgRequest> ret = new List <MsgRequest> ();
        //if (elist.Count == 0) {
        //	return null;
        //}
        var elist = EventReporter.ReportEvent();

        foreach (var e in elist)
        {
            var req     = new MsgRequest();
            var head    = new Head();
            var content = new Content();
            var msg     = new Msg();
            head.srcID   = e.sponsorId;
            head.srcType = SRCType.SIM;
            head.dstIDs.InsertRange(0, e.targetIdList);
            msg.type = Support.MsgTypeConverter(e.type);
            msg.body = World.GetInstance().GetGameObject(e.sponsorId).GetComponent <EventGenerator>().SelfSerialize(e.type, e.rawContent);
            content.msg.Add(msg);
            req.content = content;
            req.head    = head;
            ret.Add(req);
        }
        return(ret);
    }
Ejemplo n.º 2
0
 public Neo4jMetricsBuilder(MetricRegistry registry, EventReporter reporter, Config config, LogService logService, KernelContext kernelContext, Dependencies dependencies, LifeSupport life)
 {
     this._registry      = registry;
     this._reporter      = reporter;
     this._config        = config;
     this._logService    = logService;
     this._kernelContext = kernelContext;
     this._dependencies  = dependencies;
     this._life          = life;
 }
Ejemplo n.º 3
0
 public LogRotationMetrics(EventReporter reporter, MetricRegistry registry, Monitors monitors, System.Func <LogRotationMonitor> logRotationMonitorSupplier)
 {
     this._registry = registry;
     this._monitors = monitors;
     this._logRotationMonitorSupplier = logRotationMonitorSupplier;
     this._listener = durationMillis =>
     {
         SortedDictionary <string, Gauge> gauges = new SortedDictionary <string, Gauge>();
         gauges.put(LogRotationDuration, () => durationMillis);
         reporter.Report(gauges, emptySortedMap(), emptySortedMap(), emptySortedMap(), emptySortedMap());
     };
 }
Ejemplo n.º 4
0
 public CheckPointingMetrics(EventReporter reporter, MetricRegistry registry, Monitors monitors, System.Func <CheckPointerMonitor> checkPointerMonitorSupplier)
 {
     this._registry = registry;
     this._monitors = monitors;
     this._checkPointerMonitorSupplier = checkPointerMonitorSupplier;
     this._listener = durationMillis =>
     {
         SortedDictionary <string, Gauge> gauges = new SortedDictionary <string, Gauge>();
         gauges.put(CheckPointDuration, () => durationMillis);
         reporter.Report(gauges, emptySortedMap(), emptySortedMap(), emptySortedMap(), emptySortedMap());
     };
 }
        public void ReportEvent(string name, int amount)
        {
            lock (_lock)
            {
                var eventReporter = GetValue(name) as EventReporter;

                if (eventReporter == null)
                {
                    eventReporter = new EventReporter(name);
                    AddInner(name, eventReporter);
                }

                eventReporter.Record(amount);
            }
        }
Ejemplo n.º 6
0
        public async void Configuration(IAppBuilder app, bool selfHostMode)
        {
            ObjectFactory.Configure(Fr8.Infrastructure.StructureMap.StructureMapBootStrapper.LiveConfiguration);
            StructureMapBootStrapper.ConfigureDependencies(StructureMapBootStrapper.DependencyType.LIVE);

            //For PlanDirectory merge
            ObjectFactory.Configure(PlanDirectoryBootStrapper.LiveConfiguration);


            ObjectFactory.GetInstance <AutoMapperBootStrapper>().ConfigureAutoMapper();

            var db = ObjectFactory.GetInstance <DbContext>();

            db.Database.Initialize(true);

            EventReporter curReporter = ObjectFactory.GetInstance <EventReporter>();

            curReporter.SubscribeToAlerts();

            IncidentReporter incidentReporter = ObjectFactory.GetInstance <IncidentReporter>();

            incidentReporter.SubscribeToAlerts();

            StartupMigration.UpdateTransitionNames();

            SetServerUrl();

            OwinInitializer.ConfigureAuth(app, "/Account/Index");

            if (!selfHostMode)
            {
                System.Web.Http.GlobalConfiguration.Configure(ConfigureControllerActivator);
            }

            ConfigureHangfire(app, "Fr8LocalDB");

#pragma warning disable 4014
            RegisterTerminalActions(selfHostMode);
#pragma warning restore 4014

            await GenerateManifestPages();

            EnsureMThasaDocuSignRecipientCMTypeStored();
        }
        public TerminalDiscoveryService(
            IActivityTemplate activityTemplateService,
            ITerminal terminal,
            IRestfulServiceClient restfulServiceClient,
            EventReporter eventReporter,
            IUnitOfWorkFactory unitOfWorkFactory,
            IConfigRepository configRepository,
            ISecurityServices securityService)
        {
            _activityTemplateService = activityTemplateService;
            _terminal             = terminal;
            _restfulServiceClient = restfulServiceClient;
            _eventReporter        = eventReporter;
            _unitOfWorkFactory    = unitOfWorkFactory;
            _securityService      = securityService;

            var serverProtocol = configRepository.Get("ServerProtocol", String.Empty);
            var domainName     = configRepository.Get("ServerDomainName", String.Empty);
            var domainPort     = configRepository.Get <int?>("ServerPort", null);

            _serverUrl = $"{serverProtocol}{domainName}{(domainPort == null || domainPort.Value == 80 ? String.Empty : (":" + domainPort.Value))}/";
        }
        public override void SetUp()
        {
            base.SetUp();

            _eventReporter = ObjectFactory.GetInstance <EventReporter>();
        }
Ejemplo n.º 9
0
 public virtual void Add(EventReporter reporter)
 {
     _reporters.Add(reporter);
 }
Ejemplo n.º 10
0
 public Analytics()
 {
     EventReporter.Initialize("bd94ceb65698259a44db25b2fd6eefe3");
 }
Ejemplo n.º 11
0
 public void TrackEvent(string eventName, JsonObject properties = null)
 {
     EventReporter.LogEvent(eventName, properties);
 }
Ejemplo n.º 12
0
 public void EndSession()
 {
     EventReporter.EndSession();
 }
Ejemplo n.º 13
0
 public void StartSession()
 {
     EventReporter.StartSession();
 }