Skip to content

Commit a9e779a

Browse files
author
Jon Nicholson
committed
Code cleanup
1 parent 609c0d7 commit a9e779a

5 files changed

Lines changed: 20 additions & 78 deletions

File tree

Code/Sif3Framework/Sif.Framework/Model/Settings/ConfigFileBasedFrameworkSettings.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -383,31 +383,5 @@ public int JobTimeoutFrequency
383383
{
384384
get { return GetIntegerSetting(SettingsPrefix + ".job.timeout.frequency", 60); }
385385
}
386-
387-
/*
388-
/// <summary>
389-
/// <see cref="Sif.Framework.Model.Settings.IFrameworkSettings.EventsSupported"/>
390-
/// </summary>
391-
public bool EventsSupported
392-
{
393-
get { return GetBooleanSetting(SettingsPrefix + ".events.supported", false); }
394-
}
395-
396-
/// <summary>
397-
/// Frequency of events if it exists; 60 otherwise.
398-
/// </summary>
399-
public int EventsFrequency
400-
{
401-
get { return GetIntegerSetting(SettingsPrefix + ".events.frequency", 60); }
402-
}
403-
404-
/// <summary>
405-
/// Number of objects in an event if it exists; 60 otherwise.
406-
/// </summary>
407-
public int MaxObjectsInEvent
408-
{
409-
get { return GetIntegerSetting(SettingsPrefix + ".events.maxobjects", 10); }
410-
}
411-
*/
412386
}
413387
}

Code/Sif3Framework/Sif.Framework/Model/Settings/IFrameworkSettings.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public interface IFrameworkSettings
4949
/// Data model namespace if it exists; null otherwise.
5050
/// </summary>
5151
string InfrastructureNamespace { get; }
52-
52+
5353
/// <summary>
5454
/// Delete on unregister flag if it exists; false otherwise.
5555
/// </summary>
@@ -119,23 +119,5 @@ public interface IFrameworkSettings
119119
/// How often to check for timedout jobs in seconds. Default 60.
120120
/// </summary>
121121
int JobTimeoutFrequency { get; }
122-
123-
/*
124-
/// <summary>
125-
/// Intention to support events flag if it exists; false otherwise.
126-
/// </summary>
127-
bool EventsSupported { get; }
128-
129-
/// <summary>
130-
/// Frequency of events if it exists; 60 otherwise.
131-
/// </summary>
132-
int EventsFrequency { get; }
133-
134-
/// <summary>
135-
/// Number of objects in an event if it exists; 60 otherwise.
136-
/// </summary>
137-
int MaxObjectsInEvent { get; }
138-
*/
139122
}
140-
141123
}

Code/Sif3Framework/Sif.Framework/Utils/ProviderUtils.cs

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@
77
using Sif.Framework.Service.Functional;
88
using Sif.Specification.Infrastructure;
99
using System;
10-
using System.Collections.Generic;
11-
using System.Linq;
1210
using System.Net;
1311
using System.Reflection;
14-
using System.Text;
15-
using System.Threading.Tasks;
1612
using System.Web.Http.Controllers;
1713

1814
namespace Sif.Framework.Utils
@@ -61,12 +57,7 @@ public static Boolean isFunctionalService(Type type)
6157
&& type.IsVisible
6258
&& !type.IsAbstract
6359
&& typeof(IFunctionalService).IsAssignableFrom(type);
64-
/*
65-
if(isFService)
66-
{
67-
log.Debug("Found functional service: " + type.Name);
68-
}
69-
*/
60+
7061
return isFService;
7162
}
7263

@@ -108,24 +99,7 @@ public static Boolean isController(Type type)
10899
typeof(FunctionalServiceProvider).IsAssignableFrom(type)) &&
109100
typeof(IHttpController).IsAssignableFrom(type) &&
110101
type.Name.EndsWith("Provider");
111-
/*
112-
if (type.Name.Contains("FunctionalServiceProvider"))
113-
{
114-
log.Debug(type.Name + " (" + iscontroller + ")");
115-
log.Debug("isClass: " + type.IsClass);
116-
log.Debug("isVisible: " + type.IsVisible);
117-
log.Debug("isNotAbstract: " + !type.IsAbstract);
118-
log.Debug("isAssignable(IProvider): " + type.IsAssignableToGenericType(typeof(IProvider<,,>)));
119-
log.Debug("isAssignable(SifController): " + type.IsAssignableToGenericType(typeof(SifController<,>)));
120-
log.Debug("isAssignable(FSProvider): " + typeof(FunctionalServiceProvider).IsAssignableFrom(type));
121-
log.Debug("isAssignable: " + (type.IsAssignableToGenericType(typeof(IProvider<,,>)) ||
122-
type.IsAssignableToGenericType(typeof(SifController<,>)) ||
123-
typeof(FunctionalServiceProvider).IsAssignableFrom(type)));
124-
log.Debug("Is an IHttpController: " + typeof(IHttpController).IsAssignableFrom(type));
125-
log.Debug("Name ends with 'Provider': " + type.Name.EndsWith("Provider"));
126-
127-
}
128-
*/
102+
129103
return iscontroller;
130104
}
131105

Code/Sif3Framework/Sif.Framework/Utils/RightsUtils.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616

1717
using Sif.Framework.Model.Exceptions;
1818
using Sif.Framework.Model.Infrastructure;
19-
using System;
2019
using System.Collections.Generic;
21-
using System.Linq;
22-
using System.Text;
23-
using System.Threading.Tasks;
2420

2521
namespace Sif.Framework.Utils
2622
{

Code/Sif3Framework/Sif.Framework/Utils/ZoneUtils.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
using Sif.Framework.Model.Infrastructure;
1+
/*
2+
* Crown Copyright © Department for Education (UK) 2016
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
using Sif.Framework.Model.Infrastructure;
218
using System.Linq;
319

420
namespace Sif.Framework.Utils

0 commit comments

Comments
 (0)