This file contains 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
var connectionTypes = _LifetimeScope | |
.ComponentRegistry | |
.Registrations | |
.Where(reg => | |
reg.Activator | |
.LimitType | |
.GetInterfaces() | |
.Any(iface => | |
iface.IsGenericType && iface.GetGenericTypeDefinition() == typeof(IConnectionEditorViewModel<>) | |
) |
This file contains 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
namespace {Your.Namespace.Here}.Behaviors { | |
using System.Windows.Controls; | |
using System.Windows.Interactivity; | |
// Pulled from: http://codermonkey65.blogspot.com/2012/12/making-wpf-datagrid-keyboard-friendly.html | |
public class DataGridAutomaticEditingBehavior : Behavior<DataGrid> { | |
protected override void OnAttached() { | |
AssociatedObject.GotFocus += AssociatedObject_GotFocus; | |
base.OnAttached(); | |
} |
This file contains 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
namespace {YourNamespace}.ServiceBus.Tasks { | |
using System; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
public abstract class BaseSyncTask : ISyncTask { | |
protected NLog.Logger Log = NLog.LogManager.GetCurrentClassLogger(); | |
public abstract int Priority { get; } |
This file contains 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
namespace Adapt.SSRV.Web.Models { | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using System; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.ModelBinding; | |
public class ParameterModelsModelBinder : IModelBinder { | |
public bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext) { | |
if (bindingContext.ModelType != typeof(ParameterModels)) { | |
return false; |
This file contains 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
## -------------------------------------------------------------------------------------- | |
## Input | |
## -------------------------------------------------------------------------------------- | |
$webSiteName = $OctopusParameters['WebSiteName'] | |
$bindingPort = $OctopusParameters["BindingPort"] | |
$bindingIpAddress = $OctopusParameters["BindingIpAddress"] | |
$bindingHost = $OctopusParameters["BindingHost"] | |
$bindingSslThumbprint = $OctopusParameters["BindingSslThumbprint"] |
This file contains 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 NHibernate; | |
using NLog; | |
public class AccountAccessor : IAccountAccessor { | |
Logger Log = LogManager.GetCurrentClassLogger(); | |
ISessionFactory _SessionFactory; | |
public AccountAccessor(ISessionFactory sessionFactory) { | |
_SessionFactory = sessionFactory; | |
} |
This file contains 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.ObjectModel; | |
using System.Threading; | |
using System.Windows.Threading; | |
using Kiosk.Error; | |
using Kiosk.Globals; | |
namespace Kiosk.Gui.Types | |
{ | |
[Serializable] |
This file contains 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 class Customer : HQDataModelBase { | |
public virtual string FirstName { get; set; } | |
public virtual string LastName { get; set; } | |
public virtual string HomePhone { get; set; } | |
public virtual string MobilePhone { get; set; } | |
public virtual string BusinessPhone { get; set; } | |
public virtual string Email { get; set; } | |
public virtual Address Address { get; set; } | |
} |
This file contains 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 {Product}.UX.ViewModels.Framework; | |
using Caliburn.Micro; | |
using MahApps.Metro.Controls; | |
using MahApps.Metro.Controls.Dialogs; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Windows; | |
namespace {Product}.UX.Services { | |
public class DialogManager : IDialogManager { | |
public static readonly MetroDialogSettings dialogSettings = new MetroDialogSettings { |
OlderNewer