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 FactoryMethod.Sample2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// normal kullanım | |
PDFReader pdfreader = new PDFReader(); | |
pdfreader.Read(); | |
pdfreader.Extract(); |
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 Singleton.Sample10 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
IFileProcessor fileProcessor = DataProcessor.Instance; | |
var paymentFile = @"C:\Payment\out\20141204_940_159856.xml"; | |
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 Singleton.Sample1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var myFirstObject = Singleton.Instance(); | |
var mySecondObject = Singleton.Instance(); | |
var myThirdObject = Singleton.Instance(); | |
//var myFourthObject = new Singleton(); |
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 class TryCatchExtension | |
{ | |
private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | |
public static void WithTryCatch(this Object theClass, Action theMethod) | |
{ | |
try | |
{ | |
theMethod.Invoke(); | |
} |
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
// nuget package http://www.nuget.org/packages/Quartz/ | |
// http://www.quartz-scheduler.net/ | |
public class SampleJob | |
: IJob | |
{ | |
public void Execute(IJobExecutionContext context) | |
{ | |
Console.WriteLine("OK"); | |
} |
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
-- Açık olan transactionları listeler | |
SELECT L.request_session_id AS SPID, | |
DB_NAME(L.resource_database_id) AS DatabaseName, | |
O.Name AS LockedObjectName, | |
P.object_id AS LockedObjectId, | |
L.resource_type AS LockedResource, | |
L.request_mode AS LockType, | |
ST.text AS SqlStatementText, | |
ES.login_name AS LoginName, |
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 interface IModel | |
{ | |
private Guid uniqueId; | |
public Guid UniqueId | |
{ | |
get { return uniqueId; } | |
set { value = Guid.NewGuid(); } | |
} | |
} |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
BaseProcessor reportProcessor = null; | |
reportProcessor = new ImportReportProcessor(); | |
reportProcessor.ProcessorCompleted += reportProcessor_ProcessorCompleted; | |
reportProcessor.ProcessorStarting += reportProcessor_ProcessorStarting; | |
reportProcessor.ProcessorStarted += reportProcessor_ProcessorStarted; |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
BaseProcessor reportProcessor = new ReportProcessor(); | |
reportProcessor.ProcessorCompleted += reportProcessor_ProcessorCompleted; | |
reportProcessor.ProcessorStarting += reportProcessor_ProcessorStarting; | |
reportProcessor.ProcessorStarted += reportProcessor_ProcessorStarted; |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
var productOperation = new ProductOperation(); | |
var list1 = productOperation.GetPagedProductList(1, 5); | |
foreach (var item in list1) | |
Console.WriteLine(item.Id + " - " + item.Name); |