This file contains 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.Diagnostics; | |
using System.Linq; | |
/* Results | |
Dictionary. Time elapsed: 00:00:40.8066077, single iteration: 0,000408066077 ms. | |
CharDictionary. Time elapsed: 00:00:12.6748487, single iteration: 0,000126748487 ms | |
CompactCharDictionary. Time elapsed: 00:00:12.6878289, single iteration: 0,000126878289 ms |
This file contains 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
// Compile using: csc MasterSlaveExample.cs /r:Zyan.Communication.dll | |
// Run master server: MasterSlaveExample.exe | |
// Run slave server: MasterSlaveExample.exe slave | |
// Run client: MasterSlaveExample.exe client | |
using System; | |
using System.Linq; | |
using Zyan.Communication; | |
public static class Program |
This file contains 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
// https://zyan.codeplex.com/workitem/1814 | |
// Compile: c:\Windows\Microsoft.NET\Framework\v4.0.30319\csc test.cs /r:Zyan.Communication.dll | |
// Run: test.exe | |
// Then run: test.exe slave | |
using System; | |
using System.Collections; | |
using System.Linq; | |
using Zyan.Communication; |
This file contains 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
// Compile this code using: csc ipctest.cs /r:Zyan.Communication.dll | |
// First run — starts server. | |
// Second run — starts client. | |
using System; | |
using System.Linq; | |
using System.Text; | |
using Zyan.Communication; | |
using Zyan.Communication.Protocols.Ipc; |
This file contains 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
// Compile: csc test.cs /r:Zyan.Communication.dll | |
// Run server: test.exe | |
// Run client: test.exe /client | |
// Results: | |
// Shared proxy with lock benchmark. Time elapsed: 13.22 | |
// Per thread proxies benchmark. Time elapsed: 5.05 | |
// Per request proxies benchmark. Time elapsed: 5.33 | |
using System; |
This file contains 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
// Compile this code using: | |
// | |
// csc rxtest.cs /r:Zyan.Communication.dll /r:System.Reactive.Core.dll /r:System.Reactive.Linq.dll /r:System.Reactive.Interfaces.dll /r:System.Runtime.dll /r:System.Threading.Tasks.dll | |
// | |
// First run — starts server. | |
// Second run — starts client. | |
using System; | |
using System.Linq; | |
using System.Text; |
This file contains 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
// Compile this code using: | |
// | |
// csc streams.cs /r:Zyan.Communication.dll | |
// | |
// First run — starts server. | |
// Second run — starts client. | |
using System; | |
using System.IO; | |
using System.Net.Sockets; |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<configSections> | |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> | |
</configSections> | |
<entityFramework> | |
<providers> | |
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" /> | |
</providers> | |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework"> |
This file contains 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
// Zyan + EF6 concurrent data access example. | |
// Written by Alexey Yakovlev <yallie@yandex.ru> | |
// Compile this code using: | |
// | |
// csc eftest3.cs /r:Zyan.Communication.dll /r:EntityFramework.dll /r:EntityFramework.SqlServerCompact.dll /r:System.ComponentModel.DataAnnotations.dll | |
// | |
// First run — starts server. | |
// Second run — starts client. | |
using System; |
This file contains 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
Original thread: 1 | |
Current thread: 3 | |
Value is null | |
Current thread: 5 | |
Value is null | |
Current thread: 5 | |
Value is null |