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 Either<TSuccess, TFailure> | |
{ | |
private readonly TSuccess _success; | |
private readonly TFailure _failure; | |
private readonly bool _isSuccessful; | |
public bool Succeeded | |
{ | |
get | |
{ |
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
https://docs.python.org/3/tutorial/classes.html#class-objects |
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
from functools import reduce | |
http://www.artima.com/weblogs/viewpost.jsp?thread=98196 | |
list("python") | |
https://docs.python.org/3/howto/functional.html | |
line_list = [' line 1\n', 'line 2 \n'] |
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
http://stackoverflow.com/questions/10032535/can-autofixture-execute-a-delegate-at-object-creation-time?rq=1 : | |
fixture.Customize<MyClass>(c => c.Without(x => x.SomeWeirdText)); | |
public static ObjectBuilder<User> BuildUser(this Fixture f) | |
{ | |
return f.Build<User>().With(u => u.IsDeleted, false); // Probably you do not want code like this, explanation in above link. | |
} | |
http://megakemp.com/2013/04/16/general-purpose-customizations-with-autofixture/ : | |
CookbookAutoDataAttribute |
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
https://linnaeus.wordpress.com/2009/01/20/rftg-fundamentals-1/ | |
sprawdz jaka taktyke twoj przeciwnik ma (develop, military, etc). Jesli jest przewidywalny mozesz liczyc ze zagrac np Build dla ciebie. | |
Zbyt czesto gram karte () z minus jeden do Develop, gdy gram na Budowę Światów to nie jest mi to potrzebne. | |
Taktyka na wszystkie startowe. | |
Utracona ziemia taktyka: |
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
second to last - przed ostatni |
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
... |
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 IQueryableExtensions | |
{ | |
public static IOrderedQueryable<TSource> OrderBy<TSource, TKey>( | |
this IQueryable<TSource> source, | |
Expression<Func<TSource, TKey>> keySelector, | |
bool isAscending) | |
{ | |
if (isAscending) | |
{ | |
return source.OrderBy(keySelector); |
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 AutoMapperExtensions | |
{ | |
/// <summary> | |
/// Maps properties as ignored. | |
/// </summary> | |
public static IMappingExpression<TSource, TDestination> Ignore<TSource, TDestination>( | |
this IMappingExpression<TSource, TDestination> map, | |
Expression<Func<TDestination, object>> selector) | |
{ | |
map.ForMember(selector, config => config.Ignore()); |
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> | |
/// Class should be used only by AutoFixture. Used for integration database tests, when we want to avoid Id clashes with current DB entities. | |
/// It sets long value, but every time we retrieve it we get negative value. | |
/// <remarks> | |
/// Class should be used only by <see cref="Fixture"/>, either directly by Create() method or by <see cref="AutoDataAttribute"/>. | |
/// </remarks> | |
/// </summary> | |
/// <example> | |
/// This sample shows how to use the <see cref="NegativeLongId"/> class | |
/// <code> |