Example #1
0
        /// <summary>
        /// Call the ResultBuffer.AddValue() extension for each item in the enumeration.
        ///
        /// This saves of the trouble of creating a TypedValue and casting DxfCode.
        /// </summary>
        public static void AddValues(this ResultBuffer resultBuffer, IEnumerable <ObjectId> collection)
        {
            if (resultBuffer == null)
            {
                throw new ArgumentNullException(/*MSG0*/ "resultBuffer");
            }
            if (collection == null)
            {
                throw new ArgumentNullException(/*MSG0*/ "collection");
            }

            foreach (var item in collection)
            {
                resultBuffer.AddValue(item);
            }
        }
Example #2
0
 /// <summary>
 /// Add a System.Guid (as a string) to a result buffer
 ///
 /// This is called AddValue() rather than Add() to avoid confusion with ResultBuffer.Add(object)
 /// </summary>
 public static void AddValue(this ResultBuffer resultBuffer, Guid value)
 {
     resultBuffer.AddValue(value.ToString());
 }
Example #3
0
 /// <summary>
 /// Add a string as type DxfCode.Text to a result buffer
 ///
 /// This is called AddValue() rather than Add() to avoid confusion with ResultBuffer.Add(object)
 /// </summary>
 public static void AddValue(this ResultBuffer resultBuffer, string value)
 {
     resultBuffer.AddValue(value, DxfCode.Text);
 }