Ejemplo n.º 1
0
 public Datapoint(DatapointConsumer consumers, string id, string time, string[] keys, string[] values)
 {
     this.Id        = id;
     this.Time      = time;
     this.Consumers = consumers;
     this.Keys      = keys;
     this.Values    = values;
 }
Ejemplo n.º 2
0
        private IDictionary <DatapointConsumer, LogDatapoint.ClientLogEventList> TriageAndConvertDatapoints(UserContext userContext, Datapoint header, InstrumentationSettings settings, out int totalDatapointSize)
        {
            string            userContextId           = this.GetUserContextId();
            string            clientAddress           = this.GetClientAddress();
            string            userName                = this.isOwa ? base.CallContext.GetEffectiveAccessingSmtpAddress() : "ExternalUser";
            string            cookieValueAndSetIfNull = ClientIdCookie.GetCookieValueAndSetIfNull(HttpContext.Current);
            ClientLogEvent    header2          = new ClientLogEvent(header, userContextId, clientAddress, userName, this.serverVersion, base.CallContext.IsMowa, cookieValueAndSetIfNull);
            DatapointConsumer enabledConsumers = this.GetEnabledConsumers(settings);

            totalDatapointSize = 0;
            LogDatapoint.ClientLogEventList clientLogEventList  = new LogDatapoint.ClientLogEventList(DatapointConsumer.Analytics, enabledConsumers, header2);
            LogDatapoint.ClientLogEventList clientLogEventList2 = new LogDatapoint.ClientLogEventList(DatapointConsumer.Diagnostics, enabledConsumers, header2);
            LogDatapoint.ClientLogEventList clientLogEventList3 = new LogDatapoint.ClientLogEventList(DatapointConsumer.Inference, enabledConsumers, null);
            LogDatapoint.ClientLogEventList clientLogEventList4 = new LogDatapoint.ClientLogEventList(DatapointConsumer.Watson, enabledConsumers, null);
            int num = 0;

            if (userContext != null && this.datapoints[0].Id == "SessionInfo")
            {
                num = 1;
                Datapoint      datapoint      = this.datapoints[0];
                ClientLogEvent clientLogEvent = new ClientLogEvent(datapoint, userContextId, clientAddress, userName, this.serverVersion, base.CallContext.IsMowa, cookieValueAndSetIfNull);
                userContext.LogEventCommonData.UpdateClientData(clientLogEvent.DatapointProperties);
                this.clientVersion = userContext.LogEventCommonData.ClientBuild;
                clientLogEvent.UpdateTenantInfo(userContext);
                clientLogEvent.UpdateNetid(userContext);
                clientLogEvent.UpdateMailboxGuid(userContext.ExchangePrincipal);
                clientLogEvent.UpdateDatabaseInfo(userContext);
                clientLogEvent.UpdateFlightInfo(userContext.LogEventCommonData);
                clientLogEvent.UpdatePassThroughProxyInfo(this.isFromPassThroughProxy);
                clientLogEvent.UpdateUserAgent(userContext.UserAgent);
                clientLogEventList.CheckAndAdd(clientLogEvent);
                clientLogEventList3.CheckAndAdd(clientLogEvent);
                clientLogEventList2.CheckAndAdd(clientLogEvent);
                clientLogEventList4.CheckAndAdd(clientLogEvent);
            }
            for (int i = num; i < this.datapoints.Length; i++)
            {
                Datapoint datapoint2 = this.datapoints[i];
                totalDatapointSize += datapoint2.Size;
                if ((enabledConsumers & datapoint2.Consumers) != DatapointConsumer.None)
                {
                    ClientLogEvent clientLogEvent2 = new ClientLogEvent(datapoint2, userContextId, clientAddress, userName, this.serverVersion, base.CallContext.IsMowa, cookieValueAndSetIfNull);
                    if (userContext != null)
                    {
                        clientLogEvent2.UpdateClientBuildVersion(userContext.LogEventCommonData);
                        string id;
                        if (clientLogEventList.CheckAndAdd(clientLogEvent2) && (id = datapoint2.Id) != null)
                        {
                            if (< PrivateImplementationDetails > { 38B691CF - 9E72 - 4F 22 - A560 - A7F126C51047 }.$$method0x6001a88 - 1 == null)
Ejemplo n.º 3
0
 private static bool ShouldProcessForConsumer(Datapoint datapoint, DatapointConsumer consumer, DatapointConsumer enabledConsumers)
 {
     return(datapoint.IsForConsumer(consumer) && (consumer & enabledConsumers) != DatapointConsumer.None);
 }
Ejemplo n.º 4
0
 public bool IsForConsumer(DatapointConsumer consumer)
 {
     return((this.Consumers & consumer) != DatapointConsumer.None);
 }
Ejemplo n.º 5
0
 public bool IsForConsumer(DatapointConsumer consumer)
 {
     return(this.datapoint.IsForConsumer(consumer));
 }