-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b3c8cb
commit 7d4885e
Showing
9 changed files
with
3,610 additions
and
3,477 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,77 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
|
||
// ReSharper disable once CheckNamespace | ||
namespace FrameworkReplacements | ||
{ | ||
#if !(NET40 || NET45) | ||
public class Tuple<T1, T2> | ||
{ | ||
public T1 Item1 { get; set; } | ||
public T2 Item2 { get; set; } | ||
} | ||
|
||
public static class Tuple | ||
{ | ||
public static Tuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2) | ||
{ | ||
return new Tuple<T1, T2> {Item1 = item1, Item2 = item2}; | ||
} | ||
} | ||
#endif | ||
|
||
namespace Linq | ||
{ | ||
internal static class Enumerable | ||
{ | ||
#if !(NET40 || NET45) | ||
public static IEnumerable<T> Skip<T>(IEnumerable<T> items, int count) | ||
{ | ||
var i = 0; | ||
foreach (var item in items) | ||
{ | ||
if (i >= count) | ||
yield return item; | ||
i++; | ||
} | ||
} | ||
#endif | ||
internal static IEnumerable<T> GetRange<T>(IList<T> list, int start, int count) | ||
{ | ||
for (var i = 0; i < count; i++) | ||
yield return list[start + i]; | ||
} | ||
|
||
internal static T[] GetRange<T>(T[] list, int start, int count) | ||
{ | ||
var res = new T[count]; | ||
Array.Copy(list, start, res, 0, count); | ||
return res; | ||
} | ||
} | ||
} | ||
} | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
||
|
||
// ReSharper disable once CheckNamespace | ||
namespace FrameworkReplacements | ||
{ | ||
#if !(NET40 || NET45) | ||
/// <summary> | ||
/// A framework replacement for System.Tuple<T1, T2>. | ||
/// </summary> | ||
/// <typeparam name="T1">The type of the first item</typeparam> | ||
/// <typeparam name="T2">The type of the second item</typeparam> | ||
public class Tuple<T1, T2> | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating the first item | ||
/// </summary> | ||
public T1 Item1 { get; set; } | ||
/// <summary> | ||
/// Gets or sets a value indicating the second item | ||
/// </summary> | ||
public T2 Item2 { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// A utility class to create <see cref="Tuple{T1, T2}"/> items. | ||
/// </summary> | ||
public static class Tuple | ||
{ | ||
/// <summary> | ||
/// A Factory method to create <see cref="Tuple{T1, T2}"/> items. | ||
/// </summary> | ||
/// <typeparam name="T1">The type of the first item</typeparam> | ||
/// <typeparam name="T2">The type of the second item</typeparam> | ||
/// <param name="item1">The first item</param> | ||
/// <param name="item2">The second item</param> | ||
/// <returns></returns> | ||
public static Tuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2) | ||
{ | ||
return new Tuple<T1, T2> {Item1 = item1, Item2 = item2}; | ||
} | ||
} | ||
#endif | ||
|
||
namespace Linq | ||
{ | ||
internal static class Enumerable | ||
{ | ||
#if !(NET40 || NET45) | ||
public static IEnumerable<T> Skip<T>(IEnumerable<T> items, int count) | ||
{ | ||
var i = 0; | ||
foreach (var item in items) | ||
{ | ||
if (i >= count) | ||
yield return item; | ||
i++; | ||
} | ||
} | ||
#endif | ||
internal static IEnumerable<T> GetRange<T>(IList<T> list, int start, int count) | ||
{ | ||
for (var i = 0; i < count; i++) | ||
yield return list[start + i]; | ||
} | ||
|
||
internal static T[] GetRange<T>(T[] list, int start, int count) | ||
{ | ||
var res = new T[count]; | ||
Array.Copy(list, start, res, 0, count); | ||
return res; | ||
} | ||
} | ||
} | ||
} | ||
|
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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
using System; | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// Allgemeine Informationen über eine Assembly werden über die folgenden | ||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, | ||
// die mit einer Assembly verknüpft sind. | ||
[assembly: AssemblyTitle("SbnIndex")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SbnIndex")] | ||
[assembly: AssemblyCopyright("Copyright © 2013")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
#if !PCL | ||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar | ||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von | ||
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. | ||
[assembly: ComVisible(false)] | ||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird | ||
[assembly: Guid("82daf214-e442-4608-8d60-cfb7d0f15a95")] | ||
#endif | ||
|
||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: | ||
// | ||
// Hauptversion | ||
// Nebenversion | ||
// Buildnummer | ||
// Revision | ||
// | ||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern | ||
// übernehmen, indem Sie "*" eingeben: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.1.0")] | ||
[assembly: InternalsVisibleTo("SharpSbn.Test")] | ||
#if !PCL | ||
[assembly: CLSCompliant(true)] | ||
using System; | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// Allgemeine Informationen über eine Assembly werden über die folgenden | ||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, | ||
// die mit einer Assembly verknüpft sind. | ||
[assembly: AssemblyTitle("SharpSbn")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SharpSbn")] | ||
[assembly: AssemblyCopyright("Copyright © Felix Obermaier 2013-2015")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
#if !PCL | ||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar | ||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von | ||
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. | ||
[assembly: ComVisible(false)] | ||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird | ||
[assembly: Guid("82daf214-e442-4608-8d60-cfb7d0f15a95")] | ||
#endif | ||
|
||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: | ||
// | ||
// Hauptversion | ||
// Nebenversion | ||
// Buildnummer | ||
// Revision | ||
// | ||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern | ||
// übernehmen, indem Sie "*" eingeben: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.1.0.0")] | ||
[assembly: AssemblyFileVersion("1.1.0.0")] | ||
[assembly: InternalsVisibleTo("SharpSbn.Test")] | ||
#if !PCL | ||
[assembly: CLSCompliant(true)] | ||
#endif |
Oops, something went wrong.