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
| Module Module1 | |
| Sub Main() | |
| Dim log As Action(Of Func(Of Boolean)) = | |
| Sub(f) | |
| Dim cnt As Integer = 100000 | |
| Dim sw As New Stopwatch | |
| sw.Start() | |
| For i As Integer = 1 To 100000 | |
| f.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
| Imports System.Text | |
| Module Module1 | |
| Sub Main() | |
| Build_String() | |
| Build_StringBuilder() | |
| Build_ResourceFile() | |
| Build_XmlLiteral() | |
| End Sub |
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
| Imports System.Net | |
| Imports System.IO | |
| Imports Newtonsoft.Json | |
| Imports Newtonsoft.Json.Linq | |
| ''' <summary> | |
| ''' Json | |
| ''' </summary> | |
| ''' <remarks> | |
| ''' 参考サイト |
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:パラメータ指定なし | |
| Dim dic As New Dictionary(Of String, Object) | |
| Dim cmd As IDbComand = DynamicSqlParser.CreateDbCommand(cn, My.Resources.IfSql_prefix, "@", dic) | |
| '2:一部指定 | |
| Dim dic As New Dictionary(Of String, Object) | |
| dic.Add("name", "A%") | |
| Dim cmd As IDbCommand = DynamicSqlParser.CreateDbCommand(cn, My.Resources.IfSql_prefix, "@", dic) | |
| '3:一部指定 |
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
| Dim dic As New Dictionary(Of String, Object) | |
| dic.Add("age", {20, 21, 22, 30, 31, 32, 40, 41, 42}) | |
| Dim cmd As IDbCommand = DynamicSqlParser.CreateDbCommand(cn, My.Resources.InSql, "@", dic) |
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
| Dim dic As New Dictionary(Of String, Object) | |
| dic.Add("minage", 20) | |
| dic.Add("maxage", 29) | |
| Dim cmd As IDbCommand = DynamicSqlParser.CreateDbCommand(cn, My.Resources.EqualSql, "@", dic) |
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
| Imports System.Text.RegularExpressions | |
| Imports System.Text | |
| ''' <summary> | |
| ''' 動的SQLパーサー | |
| ''' </summary> | |
| ''' <remarks></remarks> | |
| Public Class DynamicSqlParser | |
| ''' <summary> | |
| ''' DBコマンドを作成します |
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
| Imports System.Runtime.CompilerServices | |
| Imports System.Text | |
| Public Module IDbCommandExtension | |
| ''' <summary> | |
| ''' DBコマンドの情報を返します | |
| ''' </summary> | |
| ''' <param name="source"></param> | |
| ''' <returns></returns> | |
| ''' <remarks></remarks> |
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
| Imports ImageMagick | |
| Imports System.Drawing | |
| ''' <summary> | |
| ''' Magick.NETラッパー | |
| ''' </summary> | |
| ''' <remarks></remarks> | |
| Public Class Magick | |
| ''' <summary> |
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
| Imports System.Runtime.CompilerServices | |
| Public Module ActionExtension | |
| Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger | |
| <Extension()> | |
| Public Sub InvokeWithLog(source As Action) | |
| Try | |
| Logger.Info("Start") |
NewerOlder