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
| namespace BDDish.Tests | |
| { | |
| public class PlaygroundDSLGerman | |
| { | |
| [Test] | |
| public void SampleForDSL() | |
| { | |
| new German.Feature("Schnittstellen"). | |
| Anforderung("FANTASYformat v1.0 exportieren"). | |
| Als(SampleKunde.NormalerKunde). |
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
| void Main() | |
| { | |
| List<Action<ServerStarten>> _exectutionQueue = new List<Action<ServerStarten>>(); | |
| _exectutionQueue.Add((serverStarten) => {serverStarten.GoGo("prod1");}); | |
| _exectutionQueue.Add((serverStarten) => {serverStarten.GoGo("prod2"); /* Do more if needed */}); | |
| ActionHandlerA(_exectutionQueue); | |
| } |
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
| new German.Feature("Schnittstellen"). | |
| Anforderung("Firmen sollen aus einem Exceldokument eingelesen werden.."). | |
| Als(Auftraggeber.Kernfunktionalität). | |
| AkzeptanzKriterium("Ein Beispieldokument wird eingelesen."). | |
| GegebenIst(Eine_Beispiel_Exceldatei). | |
| Wenn(die_import_wird). | |
| DannSollen(vier_Firmen_neu_angelegt_worden_sein). | |
| DannSoll(xy_zutreffen). | |
| Execute() |
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
| <system.diagnostics> | |
| <sources> | |
| <source name="System.ServiceModel" | |
| switchValue="Information, ActivityTracing" | |
| propagateActivity="true"> | |
| <listeners> | |
| <add name="traceListener" | |
| type="System.Diagnostics.XmlWriterTraceListener" | |
| initializeData= "c:\log\Traces.svclog" /> | |
| </listeners> |
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.Linq; | |
| using System.Text; | |
| namespace ConsoleApplication2 | |
| { | |
| class Program | |
| { | |
| static Program() { typeof(string).GetField("Empty").SetValue(null, "HaaaHa"); } |
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; | |
| namespace ConsoleApplication2 | |
| { | |
| class Program | |
| { | |
| static Program() | |
| { | |
| typeof(string).GetField("Empty"). | |
| SetValue(null, "HaaaHa"); |
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 HashLogin | |
| Public Shared Function Run(email As String, salt As String) As String | |
| Dim md5Hasher As MD5 = MD5.Create() | |
| Dim data As Byte() = md5Hasher.ComputeHash(Encoding.[Default].GetBytes(password & salt)) | |
| Dim stringBuilder = New StringBuilder() | |
| For i As Integer = 0 To data.Length - 1 | |
| stringBuilder.Append(data(i).ToString("x2")) |
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 IniFile | |
| { | |
| public string Path; | |
| [DllImport("kernel32")] | |
| private static extern long WritePrivateProfileString( | |
| string section, string key, string val, string filePath); | |
| [DllImport("kernel32")] | |
| private static extern int GetPrivateProfileString( |