Mercurial > pub > ImplabNet
annotate Implab/Formats/ByteAlphabet.cs @ 207:558f34b2fb50 v2
added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
added Safe.Dispose(IEnumerable)
added PromiseExtensions.CancellationPoint to add a cancellation point to the chain of promises
added IPromise<T> PromiseExtensions.Then<T>(this IPromise<T> that, Action<T> success) overloads
added PromiseExtensions.Error() overloads to handle a error or(and) a cancellation
author | cin |
---|---|
date | Wed, 09 Nov 2016 12:03:22 +0300 |
parents | a0ff6a0e9c44 |
children |
rev | line source |
---|---|
165 | 1 using System.Collections.Generic; |
164 | 2 using System.Linq; |
165 | 3 using Implab.Automaton; |
164 | 4 |
165 | 5 namespace Implab.Formats { |
164 | 6 public class ByteAlphabet : IndexedAlphabetBase<byte> { |
7 | |
8 #region implemented abstract members of IndexedAlphabetBase | |
9 | |
10 public override int GetSymbolIndex(byte symbol) { | |
11 return (int)symbol; | |
12 } | |
13 | |
14 public IEnumerable<byte> InputSymbols { | |
15 get { | |
16 return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>(); | |
17 } | |
18 } | |
19 | |
20 #endregion | |
21 } | |
22 } | |
23 |