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
(1 row(s) affected) | |
1 | |
Msg 8117, Level 16, State 1, Procedure proc1, Line 6 | |
Operand data type nvarchar(max) is invalid for avg operator. |
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 DelegatedFileStreamResult : FileResult | |
{ | |
readonly Action<Stream> _writer; | |
public DelegatedFileStreamResult(Action<Stream> writer, string contentType) | |
: base(contentType) | |
{ | |
_writer = writer; | |
} |
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 IoCAwareScanner : DefaultModelMetadataScanner | |
{ | |
private readonly Action<Type, Type> registerAsTransient; | |
internal static readonly Type ModelMetadataConfigurationType = typeof(IModelMetadataConfiguration); | |
protected IoCAwareScanner(Action<Type, Type> registerAsTransient) | |
{ | |
this.registerAsTransient = registerAsTransient; | |
} |
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
@for /d %%f in (*) do @call :update %%f | |
:update | |
pushd %1 | |
git fetch --all | |
popd | |
@goto :eof |
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 Localization | |
{ | |
private readonly Func<string> message; | |
private Localization(string message) | |
: this(() => message) | |
{ | |
} | |
private Localization(Func<string> message) |
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 interface IFormHandler<in TForm, out TResult> where TForm : IForm | |
{ | |
TResult Handle(TForm form); | |
} |
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 static class StringExtensions | |
{ | |
public static bool Contains(this string self, string value, StringComparison comparisonType) | |
{ | |
return self.IndexOf(value, comparisonType) != -1; | |
} | |
} |
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
// System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4 | |
// System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 |
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 interface IStatefulComponent | |
{ | |
StateBag ViewState { get; } | |
} | |
public class ViewStateField | |
{ | |
public static ViewStateField<T> Create<T>(StateBag viewState, string key) | |
{ | |
return new ViewStateField<T>(() => viewState, key); |
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 static class NullableTypeEx | |
{ | |
public static Type UnwrapIfNullable(this Type type) | |
{ | |
return type.IsNullable() ? type.GetGenericArguments()[0] : type; | |
} | |
public static bool IsNullable(this Type type) | |
{ | |
return type.IsGenericType && type.GetGenericTypeDefinition() == typeof (Nullable<>); |