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 Way | |
| public class Configuration | |
| { | |
| public string EndPoint | |
| { | |
| get { return ConfigurationManager.AppSettings["EndPoint"]; } | |
| } | |
| // other properties here// | |
| } |
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.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; | |
| namespace LinkCrawler |
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 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 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 abstract class BaseNotifierJobExecuter<TJob> | |
| : INotifierJobExecuter | |
| where TJob : IJob | |
| { | |
| private ISchedulerFactory schedulerFactory = new StdSchedulerFactory(); | |
| public IScheduler scheduler = null; | |
| protected IJob jobAction = null; | |
| protected string CronExpression = String.Empty; | |
| protected string jobKey = String.Empty; |
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
| // 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 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
| -- 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 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 IModel | |
| { | |
| private Guid uniqueId; | |
| public Guid UniqueId | |
| { | |
| get { return uniqueId; } | |
| set { value = Guid.NewGuid(); } | |
| } | |
| } |
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
| 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 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
| 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 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
| 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); |