Пример #1
0
 public Class319(
     DxfHandledObject tableControl,
     KeyedDxfHandledObjectCollection <string, T> tableRecords)
     : base(tableControl)
 {
     this.keyedDxfHandledObjectCollection_0 = tableRecords;
 }
Пример #2
0
 public Class21(IEqualityComparer<T> comparer, int dictionaryCreationThreshold, KeyedDxfHandledObjectCollection<T, U> collectionWrapper) : base(comparer, dictionaryCreationThreshold)
 {
     this.keyedDxfHandledObjectCollection_0 = collectionWrapper;
 }
Пример #3
0
 public Class21(IEqualityComparer<T> comparer, KeyedDxfHandledObjectCollection<T, U> collectionWrapper) : base(comparer)
 {
     this.keyedDxfHandledObjectCollection_0 = collectionWrapper;
 }
Пример #4
0
 public Class21(KeyedDxfHandledObjectCollection<T, U> collectionWrapper)
 {
     this.keyedDxfHandledObjectCollection_0 = collectionWrapper;
 }
Пример #5
0
        internal static string smethod_1 <T>(
            KeyedDxfHandledObjectCollection <string, T> collection,
            string name,
            bool allowLongNames)
            where T : DxfHandledObject
        {
            SortedSet <string> sortedSet = new SortedSet <string>((IComparer <string>) new CaseInsensitiveStringComparer());

            foreach (string key in (IEnumerable <string>)collection.Keys)
            {
                sortedSet.Add(key);
            }
            int    num1 = allowLongNames ? (int)byte.MaxValue : 31;
            int    toBase;
            uint   num2;
            string str1;

            if (char.IsDigit(name[name.Length - 1]))
            {
                toBase = 10;
                int index = name.Length - 2;
                while (index >= 0 && char.IsDigit(name[index]))
                {
                    --index;
                }
                int num3 = index + 1;
                try
                {
                    num2 = Convert.ToUInt32(name.Substring(num3));
                    str1 = name.Substring(0, num3);
                }
                catch (OverflowException ex)
                {
                    num2 = 1U;
                    str1 = name + "_";
                }
            }
            else
            {
                toBase = 16;
                str1   = name;
                num2   = 1U;
            }
            do
            {
                string str2 = Convert.ToString((long)num2, toBase);
                name = str1 + str2;
                if (name.Length > num1)
                {
                    goto label_16;
                }
label_15:
                ++num2;
                continue;
label_16:
                str1 = str1.Substring(0, num1 - str2.Length);
                name = str1 + str2;
                goto label_15;
            }while (sortedSet.Contains(name));
            return(name);
        }