Last change
on this file since 10207 was
9576,
checked in by spimming, 12 years ago
|
#1888:
- Added billing test client
- Use entity framework for DAL
- Modified service interface and model classes
|
File size:
1.4 KB
|
Rev | Line | |
---|
[8384] | 1 | using System;
|
---|
| 2 | using Microsoft.WindowsAzure.Diagnostics;
|
---|
| 3 | using Microsoft.WindowsAzure.ServiceRuntime;
|
---|
| 4 |
|
---|
| 5 | namespace HeuristicLab.Services.Optimization.Web {
|
---|
[8958] | 6 | public static class Constants {
|
---|
| 7 | public const string DiagnosticsConnectionString = "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString";
|
---|
| 8 | }
|
---|
| 9 |
|
---|
[8384] | 10 | public class WebRole : RoleEntryPoint {
|
---|
| 11 | public override bool OnStart() {
|
---|
| 12 | // For information on handling configuration changes
|
---|
[8958] | 13 | // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
|
---|
| 14 | try {
|
---|
| 15 | if (!String.IsNullOrEmpty(RoleEnvironment.GetConfigurationSettingValue(Constants.DiagnosticsConnectionString))) {
|
---|
| 16 | DiagnosticMonitorConfiguration dmc = DiagnosticMonitor.GetDefaultInitialConfiguration();
|
---|
| 17 | dmc.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
|
---|
| 18 | dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
|
---|
| 19 | DiagnosticMonitor.Start(Constants.DiagnosticsConnectionString, dmc);
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
[9576] | 22 | catch (RoleEnvironmentException) {
|
---|
[8958] | 23 | // diagnostics connection string not in configuration
|
---|
| 24 | // -> diagnostics disabled
|
---|
| 25 | // nothing more to do
|
---|
| 26 | }
|
---|
[8384] | 27 |
|
---|
[9166] | 28 | RoleEnvironment.Changed += RoleEnvironmentChanged;
|
---|
| 29 |
|
---|
[8384] | 30 | return base.OnStart();
|
---|
| 31 | }
|
---|
[9166] | 32 |
|
---|
| 33 | private void RoleEnvironmentChanged(object sender, RoleEnvironmentChangedEventArgs e) {
|
---|
| 34 | }
|
---|
[8384] | 35 | }
|
---|
| 36 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.