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.Linq.Expressions; | |
| using System.Text; | |
| namespace CSTest.TextBoxExpression | |
| { | |
| public class TextBoxTest | |
| { | |
| public void Test() | |
| { |
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.Data.Linq | |
| Imports System.Data.Linq.Mapping | |
| Imports System.Linq.Expressions | |
| Imports System.Reflection | |
| Imports System.IO | |
| Public Class LinqMappingRepository(Of T As Class) | |
| Private _db As DataContext | |
| Public Sub New(ByVal connectionString As String) |
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
| //Kris Vandermotten | |
| //http://www.u2u.info/Blogs/Kris/Lists/Posts/Post.aspx?ID=11 | |
| //Writes Debug info to Output window when running in debug mode | |
| //Usage: _dataContext.Log = New Vandermotten.Diagnostics.DebuggerWriter() | |
| using System; | |
| using System.Diagnostics; | |
| using System.Globalization; | |
| using System.IO; | |
| using System.Text; |
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
| Shell: | |
| "C:\Program Files\Git\bin\sh.exe" --login -i | |
| Startup Dir: | |
| %HOMEDRIVE%%HOMEPATH% |
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.Web.Mvc; | |
| public static class ListExtensions | |
| { | |
| public static IEnumerable<T> ForEach<T>(this IEnumerable<T> collection, Action<T> action) | |
| { | |
| foreach (var item in collection) action(item); | |
| return collection; |
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 StructureMap; | |
| public class Order | |
| { | |
| } | |
| interface IOrderShipper | |
| { | |
| void Ship(Order order); | |
| } |
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 class BaseReportPage<TModel> : BaseViewPage<TModel>, IViewBase where TModel : class | |
| { | |
| // ... | |
| protected override void OnPreInit(EventArgs e) | |
| { | |
| if (ShowAsPdf) | |
| { | |
| string path = _configuration.GetPrincePath(); | |
| var prince = new Prince(path); |
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 | |
| Imports EnvDTE | |
| Imports EnvDTE80 | |
| Imports EnvDTE90 | |
| Imports System.Diagnostics | |
| Public Module Main | |
| Sub AddInterface() | |
| Dim interfaceName As String = Microsoft.VisualBasic.Interaction.InputBox("Name", "Add Interface") |
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
| #Enable Signed Scripts | |
| #Set-ExecutionPolicy AllSigned | |
| #Create Trusted Root CA | |
| #makecert -n "CN=PowerShell Local Certificate Root" -a sha1 -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer -ss Root -sr localMachine | |
| #Create Personal Cert | |
| #makecert -pe -n "CN=PowerShell User" -ss MY -a sha1 -eku 1.3.6.1.5.5.7.3.3 -iv root.pvk -ic root.cer | |
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
| Sub AddInterface() | |
| Dim interfaceName As String = Microsoft.VisualBasic.Interaction.InputBox("Name", "Add Interface") | |
| If Not String.IsNullOrEmpty(interfaceName) Then | |
| If Not interfaceName.ToLower.EndsWith(".vb") Then | |
| interfaceName &= ".vb" | |
| End If | |
| DTE.ItemOperations.AddNewItem("Code\Interface", interfaceName) | |
| End If |