Experiment with this gist in Gistlyn.
Let's start with the big guns: Discriminated Union in C#.
| using System; | |
| using System.IO; | |
| using System.Reflection; | |
| namespace Kake | |
| { | |
| class Bootstrap | |
| { | |
| delegate int EntryPoint(string[] args); |
| using System; | |
| using System.Configuration; | |
| using System.Net; | |
| using Microsoft.Rtc.Collaboration; | |
| using Microsoft.Rtc.Collaboration.GroupChat; | |
| using Microsoft.Rtc.Signaling; | |
| namespace GroupChat | |
| { | |
| public static class Common |
| Rx LINQ Operator Precis | |
| Brian Beckman, May 2013 | |
| ================================================================================ | |
| Introduction | |
| ================================================================================ | |
| This is a highly abbreviated "cheat-sheet" for the LINQ operators over Rx, the | |
| Reactive Extensions. Its purpose is to TEACH by laying bare the regular and | |
| tasteful structure of the API. This structure can be difficult to perceive from | |
| ordinary documentation and source code because comparable and contrastable |
| // Licensed to the .NET Foundation under one or more agreements. | |
| // The .NET Foundation licenses this file to you under the MIT license. | |
| // See the LICENSE file in the project root for more information. | |
| /*============================================================ | |
| ** | |
| ** Class: StringBuilderCache | |
| ** | |
| ** Purpose: provide a cached reusable instance of stringbuilder |
| param ( | |
| $sessionUrl = "ftp-host-name", | |
| $username = "your-username", | |
| $password = "your-password", | |
| $remotePath = "/", | |
| $localPath = "C:\projects\...", | |
| $batches = 20 | |
| ) | |
| # use glob syntax | |
| syntax: glob | |
| *.obj | |
| *.pdb | |
| *.user | |
| *.aps | |
| *.pch | |
| *.vspscc | |
| *.vssscc |
Experiment with this gist in Gistlyn.
Let's start with the big guns: Discriminated Union in C#.
| # Where svn.exe can be found | |
| $svnPath = 'C:\Data\svn' | |
| # Where the resulting git repositories should be created | |
| $gitRepoPath = 'C:\Data\svn\git' | |
| # The branch that should become the default branch in the git repository | |
| $defaultBranch = 'trunk' | |
| $removeTempRepository = $true | |
| # The URL to the SVN server (can be file:///) | |
| $svnRepoUrl = 'file:///c:\Data\svn\SVNRepo' | |
| # The relative paths of each project inside the SVN repository, where 'trunk', 'branches' and 'tags' folders can be found |
| using System; | |
| using System.IO; | |
| using System.Reflection; | |
| using System.Runtime.InteropServices; | |
| using static System.Console; | |
| namespace versioninfo | |
| { | |
| class Program | |
| { |
| /// <summary> | |
| /// A list that can be used by readers as a true immutable read-only list | |
| /// and that supports relatively efficient "append to the end" and "remove | |
| /// from the front" operations, by sharing the underlying array whenever | |
| /// possible. Implemented as a class so it can be used to "CAS" when making | |
| /// changes in order to allow lockless immutability. | |
| /// </summary> | |
| public class ImmutableAppendOnlyList<T> : IReadOnlyList<T> | |
| { | |
| private delegate void RangeCopier(IEnumerable<T> source, T[] dest, int destOffset, int count); |