This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public long Count() | |
{ | |
var woCount = _unitOfWork.CurrentSession | |
.CreateQuery("select count(*) from Workorder") | |
.UniqueResult<long>(); | |
return woCount; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Preference GetDefaultValuePreference(int domain, string name) | |
{ | |
if (domain < 0) throw new ArgumentOutOfRangeException(Resources.InvalidDomainMustBeZeroOrGreater); | |
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name"); | |
var preference = _unitOfWork.CurrentSession.Get<Preference>(new Preference { DomainId = domain, ElementId = name }); | |
return preference ?? new Preference { DefaultValue = string.Empty, DomainId = domain, ElementId = name }; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// All of the dependencies for the core Cityworks processing | |
/// </summary> | |
public class CityworksCoreRegistry : Registry | |
{ | |
public CityworksCoreRegistry() | |
{ | |
ForRequestedType<ILogFactory>().TheDefaultIsConcreteType<NLogFactory>(); | |
ISessionFactory cityworks = NHibernateHelper.SessionFactory(Resources.CityworksDatasource); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
cd tools | |
if not exist ironruby\nul 7zip\7za.exe x -y ironruby.7z | |
cd .. | |
set PATH=%PATH%;C:\Windows\Microsoft.NET\Framework\v3.5;%CD%\tools\ironruby\bin | |
set GEM_PATH=%CD%\tools\ironruby\lib\ruby\gems\1.8 | |
set GEM_HOME=%CD%\tools\ironruby\lib\ruby\gems\1.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$LOAD_PATH << './source/Tasks/' | |
# Command configuration items - if this changes it should change | |
# for all users | |
APP_SETTINGS = YAML.load_file('common.yml') | |
# Create user settings if not present | |
setting_template = "config.yml.template" | |
if !File.exist?(setting_template.ext('')) | |
p setting_template.ext('') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
database: | |
city: 'Data Source=DWHS;User ID=yahooozi;Password=look-the-other-way;' | |
eventservices: you-get-the-idea | |
security: this-is-where-setting-values-go | |
servers: | |
gisserver: someservername | |
webserver: yepanothername | |
production: | |
database: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rexml/document' | |
@json_files | |
@xml_files | |
# This set of tasks assumes that some settings have been already | |
# been loaded in to globals called APP_SETTINGS and USER_SETTINGS. | |
# Pretty much everything will fail until that has been done, usually | |
# in a calling rakefile | |
desc "Default build task" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using CityIQ.HealthMonitor.Notifiers; | |
using CityIQ.HealthMonitor.Testers; | |
namespace CityIQ.HealthMonitor | |
{ | |
/// <summary> | |
/// Implementation that can make requests of services and optionally notify | |
/// interested parties of the results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Configuration; | |
using CityIQ.HealthMonitor.Notifiers; | |
using CityIQ.HealthMonitor.Testers; | |
using StructureMap.Attributes; | |
using StructureMap.Configuration.DSL; | |
namespace CityIQ.HealthMonitor | |
{ | |
public class HeartbeatRegistry : Registry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Timers; | |
namespace CityIQ.HealthMonitor | |
{ | |
/// <summary> | |
/// Intercepts calls to brittle or problematic resources | |
/// and maintains state of the resource using a circuit breaker | |
/// analogy. A closed circuit is good, and open circuit is bad because | |
/// it means that the resource being called is not responding within |