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; | |
namespace Test | |
{ | |
using System.Linq.Expressions; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
void Main() | |
{ | |
var a = new A(1); | |
var b = new B(2); | |
Console.WriteLine("Value of A: {0}", a.Value); | |
Console.WriteLine("Value of B: {0}", b.Value); | |
ChangeA(a); | |
Console.WriteLine("Value of A: {0}", a.Value); |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace AggregateRootTesting | |
{ | |
using System.Diagnostics; | |
using System.Reflection; |
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
<?php | |
class Console | |
{ | |
public static function WriteLine($string) | |
{ | |
echo $string . PHP_EOL; | |
} | |
public static function ReadLine() |
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
package com.company.product.domain; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.cfg.Configuration; | |
public class HibernateUtility { | |
private static final SessionFactory sessionFactory; | |
static { | |
try { |
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 static void Main(string[] args) | |
{ | |
for (var i = 0; i < 10; i++) | |
{ | |
var stopwatch = Stopwatch.StartNew(); | |
var strings = new string[4000000]; | |
stopwatch.Stop(); | |
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 StaticResources | |
{ | |
public static IState State | |
{ | |
get { return StateClass.Instance; } | |
} | |
public interface IState | |
{ | |
} |
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
class Test | |
{ | |
private string _logFilePath; | |
public string LogFilePath | |
{ | |
get | |
{ | |
if (string.IsNullOrEmpty(_logFilePath)) | |
{ |
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
interface ILogger | |
{ | |
void Log(string message); | |
} | |
class WriteToLogFile | |
{ | |
private string _logFilePath; | |
public string LogFilePath |
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
Bag<Guid> ("_attendees", x => | |
{ | |
x.Key (k => { | |
k.Column ("LessonId"); | |
}); | |
x.Access (Accessor.Field); | |
x.Table ("LessonAttendees"); | |
}, | |
x => x.Element (m => m.Column ("AttendeeId"))); |