Пример #1
0
 /// <summary>
 /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
 /// </summary>
 /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
 /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns>
 public override bool Equals(object obj)
 {
     if (obj is FilteredCriteria)
     {
         var c = (FilteredCriteria)obj;
         if (!FolderTypeID.Equals(c.FolderTypeID))
         {
             return(false);
         }
         if (!FolderRef.Equals(c.FolderRef))
         {
             return(false);
         }
         if (!Year.Equals(c.Year))
         {
             return(false);
         }
         if (!Subject.Equals(c.Subject))
         {
             return(false);
         }
         if (!FolderStatusID.Equals(c.FolderStatusID))
         {
             return(false);
         }
         if (!CreateDate.Equals(c.CreateDate))
         {
             return(false);
         }
         if (!CreateUserID.Equals(c.CreateUserID))
         {
             return(false);
         }
         if (!ChangeDate.Equals(c.ChangeDate))
         {
             return(false);
         }
         if (!ChangeUserID.Equals(c.ChangeUserID))
         {
             return(false);
         }
         return(true);
     }
     return(false);
 }
Пример #2
0
        /// <summary>
        /// Moves a collection of content items from one folder to another.
        /// </summary>
        /// <param name="contentSvc">The proxy of the content service.</param>
        /// <param name="targetPath">The target folder path.</param>
        /// <param name="sourcePath">The source folder path.</param>
        /// <param name="id">The content item ids to be moved</param>
        /// <remarks>All items being moved must have the same source and target paths.</remarks>
        public static void MoveFolderChildren(contentSOAP contentSvc, string targetPath, string sourcePath, long[] id)
        {
            MoveFolderChildrenRequest moveFolder = new MoveFolderChildrenRequest();
            FolderRef folderRefSource            = new FolderRef();
            FolderRef folderRefTarget            = new FolderRef();

            try
            {
                folderRefSource.Path = sourcePath;
                folderRefTarget.Path = targetPath;

                moveFolder.Source  = folderRefSource;
                moveFolder.Target  = folderRefTarget;
                moveFolder.ChildId = id;

                contentSvc.MoveFolderChildren(moveFolder);
            }
            catch (SoapException ex)
            {
                throw new CMSSoapException("Percussion Error in MoveFolderChildren.", ex);
            }
        }
Пример #3
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>An hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     return(string.Concat("FilteredCriteria", FolderTypeID.ToString(), FolderRef.ToString(), Year.ToString(), Subject.ToString(), FolderStatusID.ToString(), CreateDate.ToString(), CreateUserID.ToString(), ChangeDate.ToString(), ChangeUserID.ToString()).GetHashCode());
 }