示例#1
0
        /// <summary>
        ///     Creates an <see cref="IEnumerable{T}" /> from an <see cref="IMMPxNodeHistory" />
        /// </summary>
        /// <param name="source">An <see cref="IMMPxNodeHistory" /> to create an <see cref="IEnumerable{T}" /> from.</param>
        /// <returns>An <see cref="IEnumerable{T}" /> that contains the fields from the input source.</returns>
        public static IEnumerable <IMMPxHistory> AsEnumerable(this IMMPxNodeHistory source)
        {
            if (source != null)
            {
                source.Reset();
                IMMPxHistory history = source.Next();
                while (history != null)
                {
                    yield return(history);

                    history = source.Next();
                }
            }
        }
示例#2
0
 /// <summary>
 ///     Creates a copy of the specified history.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <returns>Returns a <see cref="IMMPxHistory" /> representing a copy of the history.</returns>
 public static IMMPxHistory Copy(this IMMPxHistory source)
 {
     return(new PxHistoryClass
     {
         CurrentUser = source.CurrentUser,
         CurrentUserName = source.CurrentUserName,
         Date = source.Date,
         Description = source.Description,
         ExtraData = source.ExtraData,
         Server = source.Server,
         Xml = source.Xml,
         NodeId = source.NodeId,
         nodeTypeId = source.nodeTypeId
     });
 }