Beispiel #1
0
        public static Array ListToArray(ListBase list, System.Type type)
        {
            Array result = Array.CreateInstance(type, list.Count);

            if (list.Count > 0)
            {
                list.CopyTo(result, 0);
            }

            if (type.IsSubclassOf(typeof(GLib.Opaque)))
            {
                list.elements_owned = false;
            }

            return(result);
        }
Beispiel #2
0
        public static T [] ListToArray <T> (ListBase list)
        {
            int count  = list.Count;
            var result = new T [count];

            if (count > 0)
            {
                list.CopyTo(result, 0);
            }

            if (typeof(T).IsSubclassOf(typeof(GLib.Opaque)))
            {
                list.elements_owned = false;
            }

            return(result);
        }
Beispiel #3
0
 public ListEnumerator(ListBase list)
 {
     this.list = list;
 }
Beispiel #4
0
 public ListEnumerator(ListBase list)
 {
     this.list = list;
 }
Beispiel #5
0
        public static Array ListToArray(ListBase list, System.Type type)
        {
            Array result = Array.CreateInstance (type, list.Count);
            if (list.Count > 0)
                list.CopyTo (result, 0);

            if (type.IsSubclassOf (typeof (GLib.Opaque)))
                list.elements_owned = false;

            return result;
        }