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.Collections.Generic; | |
using System.Linq; | |
using NHibernate.Criterion; | |
using ServiceStack.Common; | |
using ServiceStack.NH.Core.Domain; | |
using ServiceStack.ServiceInterface; | |
using ServiceStack.ServiceInterface.ServiceModel; | |
namespace ServiceStack.NH.Web.App_Start | |
{ |
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
while (_isRunning) | |
{ | |
try | |
{ | |
if (channel == null || consumer == null) | |
{ | |
try | |
{ | |
_connection = factory.CreateConnection(); | |
channel = _connection.CreateModel(); |
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
angular.module('bDatepicker', []). | |
directive('bDatepicker', function(){ | |
return { | |
require: '?ngModel', | |
restrict: 'A', | |
link: function ($scope, element, attrs, controller) { | |
var updateModel, onblur; | |
if (controller != null) { | |
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 System.Linq; | |
using System.Linq.Expressions; | |
using ServiceStack.Common.Utils; | |
using ServiceStack.Redis; | |
using ServiceStack.Text; | |
namespace RedisSearch | |
{ |
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 System.Linq; | |
using ServiceStack.Common.Web; | |
using ServiceStack.Redis; | |
using ServiceStack.ServiceHost; | |
using ServiceStack.ServiceInterface; | |
using ServiceStack.ServiceInterface.Providers; | |
using ServiceStack.ServiceInterface.ServiceModel; | |
using ServiceStack.ServiceModel; |
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
namespace Foo.Common.Messaging.EasyNetQ | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Threading.Tasks; |
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
desc "Checks .csproj files for StyleCop.MSBuild target" | |
task :verify_stylecop_msbuild do | |
projectFiles = FileList["./**/*.csproj"] | |
projectFiles.each{|f| | |
doc = Nokogiri::XML(File.open(f)) | |
target = doc.css('PropertyGroup > StyleCopMSBuildTargetsFile') | |
if (target.empty?) | |
puts "#{f} has no stylecop.msbuild" | |
else | |
puts "#{f} is ok" |
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>The observable extensions.</summary> | |
public static class ObservableExtensions | |
{ | |
/// <summary>Aggregates a Stream using the supplied Aggregator until the given predicate is true</summary> | |
/// <param name="source">The source.</param> | |
/// <param name="seed">The seed.</param> | |
/// <param name="accumulator">The accumulator.</param> | |
/// <param name="predicate">A predicate which indicates whether the aggregation is completed.</param> | |
/// <typeparam name="TSource">The Type of the Source stream.</typeparam> | |
/// <typeparam name="TAccumulate">The Type of the Accumulator.</typeparam> |
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> | |
/// Provides a mockable implementation of System.DateTime.Now; | |
/// </summary> | |
public static class SystemDateTime | |
{ | |
private static readonly Func<DateTime> DefaultProvider = () => DateTime.Now; | |
[ThreadStatic] | |
private static Func<DateTime> dateTimeProvider; |
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 class CreateUserValidator : AbstractValidator<CreateUser> | |
{ | |
public CreateUserValidator(IUserRepository repository) | |
{ | |
this.RuleFor(x => x.UserName) | |
.NotEmpty() | |
.Length(1, 255); | |
this.RuleFor(x => x.UserName) | |
.Must(x => x != null && !x.Any(char.IsWhiteSpace)) |
OlderNewer