diff --git a/Link.cs b/Link.cs index 3808423..9395ef0 100644 --- a/Link.cs +++ b/Link.cs @@ -301,7 +301,7 @@ public static Link Create(Link source, Link linker, Link target) Link link = CreateLink(source, linker, target); if (link == null) { - throw new OutOfMemoryException(); + throw new InvalidOperationException("Невозможно создать связь."); } CreatedEvent.Invoke(new LinkDefinition(link)); return link; diff --git a/Net.cs b/Net.cs index 28a3e4e..9130d13 100644 --- a/Net.cs +++ b/Net.cs @@ -50,7 +50,7 @@ public enum NetMapping : long Code } - public class Net + public static class Net { public static Link Link { get; private set; } public static Link Thing { get; private set; } diff --git a/NumberHelpers.cs b/NumberHelpers.cs index b8f38a7..6c1623d 100644 --- a/NumberHelpers.cs +++ b/NumberHelpers.cs @@ -70,7 +70,8 @@ public static Link FromNumber(long number) { if ((number & key) == key) { - links[i++] = FromPowerOf2(powerOf2); + links[i] = FromPowerOf2(powerOf2); + i++; } } } diff --git a/Sequences/SequenceHelpers.cs b/Sequences/SequenceHelpers.cs index 074f832..315cc05 100644 --- a/Sequences/SequenceHelpers.cs +++ b/Sequences/SequenceHelpers.cs @@ -9,7 +9,7 @@ namespace Platform.Data.Triplets.Sequences /// TODO: Check that CollectMatchingSequences algorithm is working, if not throw it away. /// TODO: Think of the abstraction on Sequences that can be equally usefull for triple links, doublet links and so on. /// - public class SequenceHelpers + public static class SequenceHelpers { public static readonly int MaxSequenceFormatSize = 20;