Exemplo n.º 1
0
 public int Append(IReadOnlySeries <Variant, Variant> appendMap, AppendOption option)
 {
     if (appendMap is VariantSeries <TKey, TValue> vs)
     {
         return(MutableInner.Append(vs.Inner, option));
     }
     throw new NotImplementedException();
 }
Exemplo n.º 2
0
 private void AppendECI(string name, int value, AppendOption option)
 {
     switch (option)
     {
         case AppendOption.NameToValue:
             s_NameToValue.Add(name, value);
             break;
         case AppendOption.ValueToName:
             s_ValueToName.Add(value, name);
             break;
         case AppendOption.Both:
             s_NameToValue.Add(name, value);
             s_ValueToName.Add(value, name);
             break;
         default:
             throw new InvalidOperationException("There is no such AppendOption");
     }
 }
Exemplo n.º 3
0
        private void Initialize(AppendOption option)
        {
            switch (option)
            {
            case AppendOption.NameToValue:
                _nameToValue = new Dictionary <string, int>();
                break;

            case AppendOption.ValueToName:
                _valueToName = new Dictionary <int, string>();
                break;

            case AppendOption.Both:
                _nameToValue = new Dictionary <string, int>();
                _valueToName = new Dictionary <int, string>();
                break;

            default:
                throw new InvalidOperationException($"There is no such {nameof(AppendOption)}.");
            }

            // ECI table. Source 01 URL: http://strokescribe.com/en/ECI.html
            // ECI table. Source 02 URL: http://lab.must.or.kr/Extended-Channel-Interpretations-ECI-Encoding.ashx
            // ToDo. Fill up remaining missing table.
            AppendECI("iso-8859-1", 1, option);
            AppendECI("IBM437", 2, option);

            // AppendECI("iso-8859-1", 3, option);	//ECI value 1 is default encoding.
            AppendECI("iso-8859-2", 4, option);
            AppendECI("iso-8859-3", 5, option);
            AppendECI("iso-8859-4", 6, option);
            AppendECI("iso-8859-5", 7, option);
            AppendECI("iso-8859-6", 8, option);
            AppendECI("iso-8859-7", 9, option);
            AppendECI("iso-8859-8", 10, option);
            AppendECI("iso-8859-9", 11, option);
            AppendECI("windows-874", 13, option);
            AppendECI("iso-8859-13", 15, option);
            AppendECI("iso-8859-15", 17, option);
            AppendECI("shift_jis", 20, option);
            AppendECI("utf-8", 26, option);
        }
Exemplo n.º 4
0
        private void AppendECI(string name, int value, AppendOption option)
        {
            switch (option)
            {
            case AppendOption.NameToValue:
                _nameToValue.Add(name, value);
                break;

            case AppendOption.ValueToName:
                _valueToName.Add(value, name);
                break;

            case AppendOption.Both:
                _nameToValue.Add(name, value);
                _valueToName.Add(value, name);
                break;

            default:
                throw new InvalidOperationException("There is no such AppendOption");
            }
        }
Exemplo n.º 5
0
        private void Initialize(AppendOption option)
        {
            switch (option)
            {
                case AppendOption.NameToValue:
                    s_NameToValue = new Dictionary<string, int>();
                    break;
                case AppendOption.ValueToName:
                    s_ValueToName = new Dictionary<int, string>();
                    break;
                case AppendOption.Both:
                    s_NameToValue = new Dictionary<string, int>();
                    s_ValueToName = new Dictionary<int, string>();
                    break;
                default:
                    throw new InvalidOperationException("There is no such AppendOption");
            }

            //ECI table. Source 01 URL: http://strokescribe.com/en/ECI.html
            //ECI table. Source 02 URL: http://lab.must.or.kr/Extended-Channel-Interpretations-ECI-Encoding.ashx
            //ToDo. Fill up remaining missing table.
            AppendECI("iso-8859-1", 1, option);
            AppendECI("IBM437", 2, option);
            //AppendECI("iso-8859-1", 3, option);	//ECI value 1 is default encoding. 
            AppendECI("iso-8859-2", 4, option);
            AppendECI("iso-8859-3", 5, option);
            AppendECI("iso-8859-4", 6, option);
            AppendECI("iso-8859-5", 7, option);
            AppendECI("iso-8859-6", 8, option);
            AppendECI("iso-8859-7", 9, option);
            AppendECI("iso-8859-8", 10, option);
            AppendECI("iso-8859-9", 11, option);
            AppendECI("windows-874", 13, option);
            AppendECI("iso-8859-13", 15, option);
            AppendECI("iso-8859-15", 17, option);
            AppendECI("shift_jis", 20, option);
            AppendECI("utf-8", 26, option);
        }
Exemplo n.º 6
0
        public int Append(IReadOnlyOrderedMap <K, Vdest> appendMap, AppendOption option)
        {
            var count = _innerMap.Append(appendMap.Map(_destToSrc), option);

            return(count);
        }
Exemplo n.º 7
0
 public int Append(IReadOnlySeries <TK, TV> appendMap, AppendOption option)
 {
     return(_innerSeries.Append(appendMap, option));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initialize ECI Set.
 /// </summary>
 /// <param name="option">AppendOption is enum under ECISet
 /// Use NameToValue during Encode. ValueToName during Decode</param>
 internal ECISet(AppendOption option)
 {
     Initialize(option);
 }
Exemplo n.º 9
0
 public int Append(IReadOnlyOrderedMap <K, SortedMap <K, V> > appendMap, AppendOption option)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 10
0
 public ValueTask <long> TryAppend(ISeries <TKey, TValue> appendMap, AppendOption option = AppendOption.RejectOnOverlap)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 11
0
 public int Append(IReadOnlySeries <TKey2, TValue2> appendMap, AppendOption option)
 {
     // TODO using ConvertSeries
     throw new NotImplementedException();
 }
Exemplo n.º 12
0
 public ValueTask <long> TryAppend(ISeries <TRowKey, DataBlock> appendMap, AppendOption option = AppendOption.RejectOnOverlap)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 13
0
 /// <summary>
 /// Initialize ECI Set. 
 /// </summary>
 /// <param name="option">AppendOption is enum under ECISet
 /// Use NameToValue during Encode. ValueToName during Decode</param>
 internal ECISet(AppendOption option)
 {
     Initialize(option);
 }
Exemplo n.º 14
0
 public ValueTask <long> TryAppend(ISeries <TKey, TValue> appendMap, AppendOption option = AppendOption.RejectOnOverlap)
 {
     ThrowHelper.ThrowNotImplementedException();
     return(default);