Exemple #1
0
        public object CreateClsForIdlInstance(object idlInstance)
        {
            java.util.HashMapImpl        source = (java.util.HashMapImpl)idlInstance;
            System.Collections.Hashtable result = new System.Collections.Hashtable();

            System.Collections.DictionaryEntry[] buckets = source.GetBuckets();
            for (int i = 0; i < buckets.Length; i++)
            {
                object key = UnboxJavaInstanceIfNeeded(buckets[i].Key);
                object val = UnboxJavaInstanceIfNeeded(buckets[i].Value);
                result.Add(key, val);
            }

            return(result);
        }
Exemple #2
0
        public object CreateIdlForClsInstance(object clsInstance)
        {
            java.util.HashMapImpl        result = new java.util.HashMapImpl();
            System.Collections.Hashtable source = (System.Collections.Hashtable)clsInstance;

            result.Capacity = (int)((source.Count + 1) / result.LoadFactor) + 1;
            System.Collections.DictionaryEntry[] buckets = new System.Collections.DictionaryEntry[source.Count];
            int i = 0;

            foreach (System.Collections.DictionaryEntry entry in source)
            {
                object key = BoxClsInstanceIfNeeded(entry.Key);
                object val = BoxClsInstanceIfNeeded(entry.Value);
                buckets[i] = new System.Collections.DictionaryEntry(key, val);
                i++;
            }
            result.SetBuckets(buckets);

            return(result);
        }
        public object CreateIdlForClsInstance(object clsInstance) {
            java.util.HashMapImpl result = new java.util.HashMapImpl();
            System.Collections.Hashtable source = (System.Collections.Hashtable)clsInstance;

            result.Capacity = (int)((source.Count + 1) / result.LoadFactor) + 1;
            System.Collections.DictionaryEntry[] buckets = new System.Collections.DictionaryEntry[source.Count];
            int i = 0;
            foreach (System.Collections.DictionaryEntry entry in source) {
                object key = BoxClsInstanceIfNeeded(entry.Key);
                object val = BoxClsInstanceIfNeeded(entry.Value);
                buckets[i] = new System.Collections.DictionaryEntry(key, val);
                i++;
            }
            result.SetBuckets(buckets);
               
            return result;
        }