Last change
on this file since 14821 was
9586,
checked in by fschoepp, 12 years ago
|
#1888:
- Billing Component may now be deactivated by setting the BillingEnabled flag within the OaaS service configuration.
- Added views for invoices and usage data.
- Changed appearance of the SaveOrder view.
|
File size:
774 bytes
|
Rev | Line | |
---|
[9586] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Web;
|
---|
| 5 | using Microsoft.WindowsAzure.ServiceRuntime;
|
---|
| 6 | using System.Configuration;
|
---|
| 7 |
|
---|
| 8 | namespace HeuristicLab.Services.Optimization.Web.Helpers {
|
---|
| 9 | public static class BillingComponent {
|
---|
| 10 | public static bool Enabled {
|
---|
| 11 | get {
|
---|
| 12 | try {
|
---|
| 13 | if (RoleEnvironment.IsAvailable) {
|
---|
| 14 | return Convert.ToBoolean(RoleEnvironment.GetConfigurationSettingValue("BillingEnabled"));
|
---|
| 15 | }
|
---|
| 16 | else {
|
---|
| 17 | return Convert.ToBoolean(ConfigurationManager.AppSettings["BillingEnabled"]);
|
---|
| 18 | }
|
---|
| 19 | }
|
---|
| 20 | catch (Exception) {
|
---|
| 21 | // simply disallow billing component if not set
|
---|
| 22 | return false;
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.