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. Install-Package Microsoft.AspNet.WebApi.Owin | |
| // 2. Install-Package Microsoft.Owin.Host.SystemWeb | |
| // | |
| public class Startup | |
| { | |
| public void Configuration(IAppBuilder appBld) | |
| { | |
| // Possible to define DEFAULT action-module: | |
| appBld.Properties["builder.DefaultApp"] = new AppFunc( env => | |
| { |
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
| [ServiceContract] | |
| public interface IMyServiceContract | |
| { | |
| [OperationContract] | |
| [FaultContract(typeof(FaultException))] | |
| string OperationAndFaultContract(int a); | |
| } | |
| //=========================================== | |
| public class MyServiceContract : IMyServiceContract |
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
| @SETLOCAL | |
| @SET now=%DATE:~0,2% | |
| @SET /a nowmod2=now %% 2 | |
| @IF %now% == 28 ( SET suffix=%now%) ELSE IF %nowmod2% == 0 ( SET suffix=Even ) ELSE ( SET suffix=Odd ) | |
| @"C:\Program Files\7-Zip\7z.exe" a -spf -ssw -x!*.log -r "%USERPROFILE%\Bkps\PFL_BKP_%suffix%.zip" "%USERPROFILE%\Desktop\*" | |
| @ECHO . | |
| @ECHO Today is - %now% | |
| @ECHO . | |
| @ECHO Bkp-suffix is - %suffix% | |
| PAUSE |
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 Csproj_Config_Files_Parse_ | |
| { | |
| void GetInfoAboutAllAssemblies() | |
| { | |
| string rootDir = @"c:\Bla-Bla-Bla... Path To Solution Directory"; | |
| string rezFile = @"c:\Bla-Bla-Bla... Path To REZULT_FILE.txt"; | |
| 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 System.ServiceModel; | |
| using System.ServiceModel.Description; | |
| [ServiceContract] | |
| interface Interface1 | |
| { | |
| [OperationContract] | |
| int Sum(int a, int b); | |
| } |
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
| $currPath = $MyInvocation.MyCommand.Path | |
| $logFiles = Get-ChildItem $currPath | where { $_.extension -eq ".log" } | |
| # Read & show last 10 lines of every log-file (exclude empty lines) | |
| foreach ($file in $logFiles) { | |
| Echo "-----------------------------------------"; | |
| ""; | |
| Echo $file.ToString().ToUpper(); # FileName as Header. | |
| ""; |
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 IAsyncResultClass | |
| { | |
| Func<int, int, int> deleg = new Func<int, int, int>(MyAsyncMeth); | |
| private static int MyAsyncMeth(int a, int b) | |
| { | |
| for (int i = 0; i < 4; i++) | |
| { | |
| Console.Write("MyAsyncMeth"); | |
| System.Threading.Thread.Sleep(1500); |
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 IAsyncResultClass | |
| { | |
| Action deleg = new Action(MyAsyncMeth); | |
| private static void MyAsyncMeth() | |
| { | |
| for (int i = 0; i < 4; i++) | |
| { | |
| Console.Write("MyAsyncMeth"); | |
| System.Threading.Thread.Sleep(1500); |
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 Microsoft.Win32; | |
| using System; | |
| using System.Data; | |
| using System.Data.Common; | |
| using System.Data.SQLite; | |
| using System.IO; | |
| namespace SQLight_Test | |
| { | |
| class Program |
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 Microsoft.Win32; | |
| class Program | |
| { | |
| private static SessionSwitchEventHandler sseh; | |
| static void Main(string[] args) | |
| { | |
| try | |
| { |