コード例 #1
0
ファイル: LocalTrack.cs プロジェクト: xiaohszx/Hurricane
        public override bool Equals(PlayableBase other)
        {
            if (other == null)
            {
                return(false);
            }
            if (!other.TrackExists || !TrackExists)
            {
                return(false);
            }
            if (GetType() != other.GetType())
            {
                return(false);
            }

            var otherAsLocalTrack = (LocalTrack)other;

            if (UniqueId == otherAsLocalTrack.UniqueId)
            {
                return(true);
            }

            // Mike: commented out temporarily; this is drastic measure, why is it needed?
            //if (TrackInformation.Length == otherAsLocalTrack.TrackInformation.Length)
            //{
            //    if (string.IsNullOrEmpty(_fileHash))
            //        _fileHash = GeneralHelper.FileToMD5Hash(TrackInformation.FullName);
            //    if (string.IsNullOrEmpty(otherAsLocalTrack._fileHash))
            //        otherAsLocalTrack._fileHash = GeneralHelper.FileToMD5Hash(TrackInformation.FullName);
            //    if (otherAsLocalTrack._fileHash == _fileHash) return true;
            //}

            return(false);
        }
コード例 #2
0
ファイル: SoundCloudTrack.cs プロジェクト: xiaohszx/Hurricane
 public override bool Equals(PlayableBase other)
 {
     if (other == null)
     {
         return(false);
     }
     if (GetType() != other.GetType())
     {
         return(false);
     }
     return(SoundCloudID == ((SoundCloudTrack)other).SoundCloudID);
 }
コード例 #3
0
ファイル: YouTubeTrack.cs プロジェクト: xiaohszx/Hurricane
 public override bool Equals(PlayableBase other)
 {
     if (other == null)
     {
         return(false);
     }
     if (GetType() != other.GetType())
     {
         return(false);
     }
     return(Link == ((YouTubeTrack)other).Link);
 }
コード例 #4
0
ファイル: LocalTrack.cs プロジェクト: Zhenya1256/XTest
        public override bool Equals(PlayableBase other)
        {
            if (other == null)
            {
                return(false);
            }
            if (!other.TrackExists || !TrackExists)
            {
                return(false);
            }
            if (GetType() != other.GetType())
            {
                return(false);
            }

            var otherAsLocalTrack = (LocalTrack)other;

            if (UniqueId == otherAsLocalTrack.UniqueId)
            {
                return(true);
            }
            return(false);
        }
コード例 #5
0
 public override bool Equals(PlayableBase other)
 {
     return(other == this);
 }
コード例 #6
0
ファイル: StreamableBase.cs プロジェクト: xiaohszx/Hurricane
 public override abstract bool Equals(PlayableBase other);