Beispiel #1
0
        // Token: 0x0600144F RID: 5199 RVA: 0x00075368 File Offset: 0x00073568
        public Configuration()
        {
            bool               configBoolValue     = AppConfigLoader.GetConfigBoolValue("InferenceDataCollectionIsLoggingEnabled", true);
            LoggingLevel       configEnumValue     = AppConfigLoader.GetConfigEnumValue <LoggingLevel>("InferenceDataCollectionLoggingLevel", LoggingLevel.Debug);
            string             configStringValue   = AppConfigLoader.GetConfigStringValue("InferenceDataCollectionLogPath", Configuration.DefaultLogPath);
            TimeSpan           configTimeSpanValue = AppConfigLoader.GetConfigTimeSpanValue("InferenceDataCollectionMaxLogAge", TimeSpan.Zero, TimeSpan.MaxValue, TimeSpan.FromDays(30.0));
            ByteQuantifiedSize byteQuantifiedSize  = ConfigurationUtils.ReadByteQuantifiedSizeValue("InferenceDataCollectionMaxLogDirectorySize", ByteQuantifiedSize.FromGB(1UL));
            ByteQuantifiedSize byteQuantifiedSize2 = ConfigurationUtils.ReadByteQuantifiedSizeValue("InferenceDataCollectionMaxLogFileSize", ByteQuantifiedSize.FromMB(10UL));

            base.MetadataLogConfig                = new LogConfig(configBoolValue, "InferenceMetadata", "InferenceMetadata", Path.Combine(configStringValue, "Metadata"), new ulong?(byteQuantifiedSize.ToBytes()), new ulong?(byteQuantifiedSize2.ToBytes()), new TimeSpan?(configTimeSpanValue), 4096);
            base.DiagnosticLogConfig              = new DiagnosticLogConfig(configBoolValue, "InferenceDataCollection", "InferenceDataCollection", configStringValue, new ulong?(byteQuantifiedSize.ToBytes()), new ulong?(byteQuantifiedSize2.ToBytes()), new TimeSpan?(configTimeSpanValue), configEnumValue);
            base.MailboxReprocessAge              = AppConfigLoader.GetConfigTimeSpanValue("InferenceDataCollectionMailboxReprocessAge", TimeSpan.Zero, TimeSpan.MaxValue, TimeSpan.FromDays(30.0));
            base.ModuloNumberToRandomize          = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionModuloNumberToRandomize", 1, int.MaxValue, 500);
            this.ModuloNumberToRandomizeForGroups = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionModuloNumberToRandomizeForGroups", 1, int.MaxValue, 10);
            base.BlackListedFolders               = ConfigurationUtils.ReadCommaSeperatedStringValue("InferenceDataCollectionBlackListedFolders", null);
            base.WhiteListedFolders               = ConfigurationUtils.ReadCommaSeperatedStringValue("InferenceDataCollectionWhiteListedFolders", null);
            base.MinimumItemCountInMailbox        = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionMinimumItemCountInMailbox", 0, int.MaxValue, 0);
            base.MinimumSentItemsCount            = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionMinimumSentItemsCount", 0, int.MaxValue, 0);
            base.NumberOfItemsPerFolderToProcess  = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionNumberOfItemsPerFolderToProcess", 0, int.MaxValue, int.MaxValue);
            base.MinimumSentItemsPercentage       = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionMinimumSentItemsPercentage", 0, 100, 0);
            base.IsOutputSanitized                = AppConfigLoader.GetConfigBoolValue("InferenceDataCollectionIsOutputSanitized", true);
            base.QueryPageSize           = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionQueryPageSize", 0, 32767, 100);
            base.CollectMessageBodyProps = AppConfigLoader.GetConfigBoolValue("InferenceDataCollectionCollectMessageBodyProps", false);
            base.ChunkSize           = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionChunkSize", 1, int.MaxValue, 1000);
            base.ItemMaxAttemptCount = AppConfigLoader.GetConfigIntValue("InferenceDataCollectionItemMaxAttemptCount", 1, 10, 3);
        }
Beispiel #2
0
 // Token: 0x06001D50 RID: 7504 RVA: 0x00074AA8 File Offset: 0x00072CA8
 public SpeechRecognitionProcessor(HttpContext httpContext)
 {
     this.speechScenario = SpeechRecognitionProcessor.CreateSpeechRecognitionScenario(httpContext, out this.budget);
     this.HttpContext    = httpContext;
     this.parameters     = this.speechScenario.Parameters;
     this.userContext    = this.speechScenario.UserContext;
     this.maxAudioSize   = AppConfigLoader.GetConfigIntValue("SpeechRecognitionMaxAudioSize", 0, int.MaxValue, 32500);
 }
        // Token: 0x06001158 RID: 4440 RVA: 0x000426A0 File Offset: 0x000408A0
        internal override void Initialize()
        {
            Stopwatch stopwatch = Stopwatch.StartNew();

            ExTraceGlobals.ConfigurationManagerTracer.TraceDebug(0L, "OwaApplication.Initialize: SafeHtml loading begin");
            IntPtr value = NativeMethods.LoadLibrary(Path.GetFullPath(Path.Combine(ExchangeSetupContext.BinPath, "SafeHtmlNativeWrapper.dll")));

            if (value == IntPtr.Zero)
            {
                ExTraceGlobals.ConfigurationManagerTracer.TraceError(0L, "OwaApplication.Initialize: Failed to load SafeHtmlNativeWrapper.");
                Global.SafeHtmlLoaded = false;
            }
            else
            {
                ExTraceGlobals.ConfigurationManagerTracer.TraceDebug(0L, "OwaApplication.Initialize: SafeHtmlNativeWrapper loaded successfully.");
                Global.SafeHtmlLoaded = true;
            }
            SafeHtml.Initialize(ExchangeSetupContext.BinPath + Path.DirectorySeparatorChar);
            ExTraceGlobals.ConfigurationManagerTracer.TraceDebug(0L, "OwaApplication.Initialize: SafeHtml loading finished");
            Global.InitializeSettingsFromWebConfig();
            int workerThreads;
            int num;

            ThreadPool.GetMinThreads(out workerThreads, out num);
            int configIntValue = AppConfigLoader.GetConfigIntValue("ThreadPoolMinIOCPThreads", 0, int.MaxValue, 3 * Environment.ProcessorCount);

            ThreadPool.SetMinThreads(workerThreads, configIntValue);
            OwaApplication.InitializeApplicationCaches();
            RequestDetailsLogger.ApplicationType = LoggerApplicationType.Owa;
            OwaClientLogger.Initialize();
            OwaClientTraceLogger.Initialize();
            OwaServerLogger.Initialize();
            OwaServerTraceLogger.Initialize();
            SettingOverrideSync.Instance.Start(true);
            LoggerSettings.MaxAppendableColumnLength   = null;
            LoggerSettings.ErrorMessageLengthThreshold = null;
            Global.ResponseShapeResolver = new OwaResponseShapeResolver();
            Global.EwsClientMailboxSessionCloningHandler = new EwsClientMailboxSessionCloningHandler(UserContextManager.GetClonedMailboxSession);
            Global.DefaultMapiClientType             = "Client=OWA";
            MailboxSession.DefaultFoldersToForceInit = OwaApplication.foldersToForceInitialize;
            UserContextManager.Initialize();
            if (Globals.OwaIsNoRecycleEnabled)
            {
                OwaVersionId.InitializeOwaVersionReadingTimer();
            }
            KillBitTimer.Singleton.Start();
            KillbitWatcher.TryWatch(new KillbitWatcher.ReadKillBitFromFileCallback(KillBitHelper.ReadKillBitFromFile));
            OwaServerLogger.AppendToLog(new OwaAppStartLogEvent((double)stopwatch.ElapsedMilliseconds));
        }
Beispiel #4
0
 public AppConfig()
 {
     this.TMSyncCacheSlidingExpiry       = AppConfigLoader.GetConfigTimeSpanValue("TMSyncCacheSlidingExpiry", TimeSpan.FromSeconds(1.0), TimeSpan.MaxValue, TimeSpan.FromMinutes(15.0));
     this.TMSyncCacheAbsoluteExpiry      = AppConfigLoader.GetConfigTimeSpanValue("TMSyncCacheAbsoluteExpiry", TimeSpan.FromSeconds(1.0), TimeSpan.MaxValue, TimeSpan.FromHours(4.0));
     this.TMSyncCacheBucketCount         = AppConfigLoader.GetConfigIntValue("TMSyncCacheBucketCount", 1, int.MaxValue, 10);
     this.TMSyncCacheBucketSize          = AppConfigLoader.GetConfigIntValue("TMSyncCacheBucketSize", 1, int.MaxValue, 100);
     this.TMSyncMaxJobQueueLength        = AppConfigLoader.GetConfigIntValue("TMSyncMaxJobQueueLength", 1, int.MaxValue, 100);
     this.TMSyncMaxPendingJobs           = AppConfigLoader.GetConfigIntValue("TMSyncMaxPendingJobs", 1, int.MaxValue, 5);
     this.TMSyncSharePointQueryPageSize  = AppConfigLoader.GetConfigIntValue("TMSyncSharePointQueryPageSize", 1, int.MaxValue, 100);
     this.TMSyncDispatcherWakeupInterval = AppConfigLoader.GetConfigTimeSpanValue("TMSyncDispatcherWakeupInterval", TimeSpan.FromMilliseconds(100.0), TimeSpan.MaxValue, TimeSpan.FromSeconds(5.0));
     this.TMSyncMinSyncInterval          = AppConfigLoader.GetConfigTimeSpanValue("TMSyncMinSyncInterval", TimeSpan.Zero, TimeSpan.MaxValue, TimeSpan.FromSeconds(30.0));
     this.TMSyncUseOAuth         = AppConfigLoader.GetConfigBoolValue("TMSyncUseOAuth", true);
     this.TMSyncHttpDebugEnabled = AppConfigLoader.GetConfigBoolValue("TMSyncHttpDebugEnabled", false);
     this.EnqueueRequestTimeout  = AppConfigLoader.GetConfigTimeSpanValue("EnqueueRequestTimeout", TimeSpan.FromSeconds(5.0), TimeSpan.MaxValue, TimeSpan.FromSeconds(300.0));
 }
Beispiel #5
0
        public DiagnosticsAggregationServiceletConfig()
        {
            this.Enabled = AppConfigLoader.GetConfigBoolValue("DiagnosticsAggregationServiceletEnabled", true);
            this.TimeSpanForQueueDataBeingCurrent = AppConfigLoader.GetConfigTimeSpanValue("TimeSpanForQueueDataBeingCurrent", TimeSpan.FromMinutes(1.0), TimeSpan.FromHours(1.0), TimeSpan.FromMinutes(11.0));
            this.TimeSpanForQueueDataBeingStale   = AppConfigLoader.GetConfigTimeSpanValue("TimeSpanForQueueDataBeingStale", TimeSpan.FromMinutes(1.0), TimeSpan.FromHours(10.0), TimeSpan.FromHours(1.0));
            this.LoggingEnabled = AppConfigLoader.GetConfigBoolValue("DiagnosticsAggregationLoggingEnabled", false);
            Assembly executingAssembly = Assembly.GetExecutingAssembly();
            string   path = Path.Combine(Directory.GetParent(Path.GetDirectoryName(executingAssembly.Location)).FullName, "TransportRoles\\Logs\\DiagnosticsAggregation\\");

            this.LogFileDirectoryPath = AppConfigLoader.GetConfigStringValue("DiagnosticsAggregationLogFileDirectoryPath", Path.GetFullPath(path));
            int configIntValue = AppConfigLoader.GetConfigIntValue("DiagnosticsAggregationLogFileMaxSizeInMB", 1, 10000, 2);

            this.LogFileMaxSize = ByteQuantifiedSize.FromMB((ulong)((long)configIntValue));
            int configIntValue2 = AppConfigLoader.GetConfigIntValue("DiagnosticsAggregationLogFileMaxDirectorySizeInMB", 1, 10000, 10);

            this.LogFileMaxDirectorySize = ByteQuantifiedSize.FromMB((ulong)((long)configIntValue2));
            this.LogFileMaxAge           = AppConfigLoader.GetConfigTimeSpanValue("DiagnosticsAggregationLogFileMaxAge", TimeSpan.FromMinutes(1.0), TimeSpan.FromDays(365.0), TimeSpan.FromDays(15.0));
        }
Beispiel #6
0
        public ClientWatsonParameters(string owaVersion)
        {
            this.symbolsFolderPath          = AppConfigLoader.GetConfigStringValue("ClientWatsonSymbolsFolderPath", Path.Combine(ExchangeSetupContext.InstallPath, string.Format("ClientAccess\\Owa\\{0}\\ScriptSymbols", ResourcePathBuilderUtilities.GetResourcesRelativeFolderPath(owaVersion))));
            this.maxNumberOfWatsonsPerError = AppConfigLoader.GetConfigIntValue("ClientWatsonMaxReportsPerError", 1, int.MaxValue, 5);
            TimeSpan configTimeSpanValue = AppConfigLoader.GetConfigTimeSpanValue("ClientWatsonResetErrorCountInterval", TimeSpan.FromSeconds(1.0), TimeSpan.FromDays(1.0), TimeSpan.FromHours(1.0));

            this.resetErrorsReportedTimer = new Timer(delegate(object param0)
            {
                this.clientErrorsReported = new ConcurrentDictionary <int, int>();
            }, null, configTimeSpanValue, configTimeSpanValue);
            Version installedVersion = ExchangeSetupContext.InstalledVersion;

            this.ExchangeSourcesPath = string.Format("\\\\exsrc\\SOURCES\\ALL\\{0:D2}.{1:D2}.{2:D4}.{3:D3}\\", new object[]
            {
                installedVersion.Major,
                installedVersion.Minor,
                installedVersion.Build,
                installedVersion.Revision
            });
            this.owaVersion = owaVersion;
        }
Beispiel #7
0
 private int GetInstrumentationUploadDuration()
 {
     return(AppConfigLoader.GetConfigIntValue("ClientInstrumentationUploadDuration", 1, int.MaxValue, 55));
 }