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
| SELECT | |
| j.name AS job_name | |
| ,ja.start_execution_date | |
| ,ISNULL(last_executed_step_id, 0) + 1 AS current_executed_step_id | |
| ,js.step_name | |
| ,ja.session_id | |
| ,js.command | |
| ,js.last_run_duration | |
| ,ja.job_id | |
| FROM msdb.dbo.sysjobactivity ja |
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
| /* Config setting | |
| <configuration> | |
| <system.diagnostics> | |
| <sources> | |
| <source name="System.ServiceModel.MessageLogging"> | |
| <listeners> | |
| <add name="xml" /> | |
| </listeners> | |
| </source> | |
| </sources> |
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
| var phone = "+77771112233" | |
| var record = GetRecordById(Id); | |
| new RulePrototypeConcrete() | |
| .With(new ChangePhoneRule(phone)) | |
| .With(new DeletePhoneRule(phone)) | |
| .With(new ExistsPhoneRule(phone)) | |
| .Execute(record); | |
| public abstract class RulePrototype : IDisposable |
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 ConditionalExtensions | |
| { | |
| /// <summary> | |
| /// Unification ternary operation | |
| /// </summary> | |
| /// <typeparam name="T">in type</typeparam> | |
| /// <typeparam name="V">out type</typeparam> | |
| /// <param name="baseObject">this object</param> | |
| /// <param name="exp">boolean expression</param> | |
| /// <param name="firstValue">true value</param> |
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 string TruncateString(this string value, int maxLength) | |
| { | |
| int valueLength = value.Length; | |
| const string CHARACTER_REPLACE = "..."; | |
| int startPosition = (maxLength / 3); | |
| if(valueLength > maxLength) | |
| { | |
| try | |
| { |
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 Dapper; | |
| using Oracle.ManagedDataAccess.Client; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Linq; | |
| public class OracleDynamicParameters : Dapper.SqlMapper.IDynamicParameters { | |
| private static Dictionary<SqlMapper.Identity, Action<IDbCommand, object>> paramReaderCache = new Dictionary<SqlMapper.Identity, Action<IDbCommand, object>>( ); |
NewerOlder