Exemplo n.º 1
0
        /// <summary>
        /// Returns an array with all items of the RawValueArray
        /// </summary>
        /// <remarks>
        /// This method is useful to avoid unnecessary debugger-debuggee roundtrips
        /// when processing all items of an array. For example, if a RawValueArray
        /// represents an image encoded in a byte[], getting the values one by one
        /// using the indexer is very slow. The ToArray() will return the whole byte[]
        /// in a single call.
        /// </remarks>
        public Array ToArray()
        {
            var array = source.ToArray();

            for (int i = 0; i < array.Length; i++)
            {
                var val = array.GetValue(i) as IRawObject;
                if (val != null)
                {
                    val.Connect(session, options);
                }
            }
            return(array);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Returns an array with all items of the RawValueArray
 /// </summary>
 /// <remarks>
 /// This method is useful to avoid unnecessary debugger-debuggee roundtrips
 /// when processing all items of an array. For example, if a RawValueArray
 /// represents an image encoded in a byte[], getting the values one by one
 /// using the indexer is very slow. The ToArray() will return the whole byte[]
 /// in a single call.
 /// </remarks>
 public Array ToArray()
 {
     return(source.ToArray());
 }
Exemplo n.º 3
0
 public Array ToArray()
 {
     return(MtaThread.Run(() => source.ToArray()));
 }