Example #1
0
                    public void Reset()
                    {
                        ContentLengthGroup content = _content;

                        if (content == null)
                        {
                            throw new ObjectDisposedException(this.GetType().FullName);
                        }
                        Monitor.Enter(content.SyncRoot);
                        try
                        {
                            if ((_firstMD5Node == null) ? content._firstMD5Node == null : (content._md5Count == _md5Count && content._firstMD5Node != null &&
                                                                                           ReferenceEquals(content._firstMD5Node, _firstMD5Node) && ReferenceEquals(content._lastMD5Node, _lastMD5Node)))
                            {
                                _current      = null;
                                _firstMD5Node = content._firstMD5Node;
                                _lastMD5Node  = content._lastMD5Node;
                                // _md5Count = content._md5Count;
                                // return;
                                throw new NotImplementedException();
                            }
                        }
                        finally { Monitor.Exit(content.SyncRoot); }

                        throw new InvalidOperationException(ErrorMessage_ListModified);
                    }
Example #2
0
 internal Enumerator(ContentLengthGroup content)
 {
     _content = content;
     Monitor.Enter(content.SyncRoot);
     try
     {
         _firstMD5Node = content._firstMD5Node;
         _lastMD5Node  = content._lastMD5Node;
         // md5Count = content._md5Count;
         throw new NotImplementedException();
     }
     finally { Monitor.Exit(content.SyncRoot); }
 }
Example #3
0
                    public bool MoveNext()
                    {
                        ContentLengthGroup content = _content;

                        if (content == null)
                        {
                            throw new ObjectDisposedException(this.GetType().FullName);
                        }
                        Monitor.Enter(content.SyncRoot);
                        try
                        {
                            if (_firstMD5Node == null)
                            {
                                if (content._firstMD5Node == null)
                                {
                                    return(false);
                                }
                            }
                            else if (content._md5Count == _md5Count && content._firstMD5Node != null && ReferenceEquals(content._firstMD5Node, _firstMD5Node) && ReferenceEquals(content._lastMD5Node, _lastMD5Node))
                            {
                                ContentMD5Group node = Current;
                                if (node == null)
                                {
                                    _current = _firstMD5Node;
                                    return(true);
                                }
                                else if ((node = node._nextNode) != null)
                                {
                                    _current = node;
                                    return(true);
                                }
                                else
                                {
                                    return(false);
                                }
                            }
                        }
                        finally { Monitor.Exit(content.SyncRoot); }

                        throw new InvalidOperationException(ErrorMessage_ListModified);
                    }
 internal ContentMD5Group(ContentLengthGroup parent, MD5Checksum checksum)
 {
     _owner   = parent.Checksums;
     Checksum = checksum;
 }
Example #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(ContentLengthGroup other)
 {
     throw new NotImplementedException();
 }
Example #6
0
 internal ChecksumsList(ContentLengthGroup content)
 {
     Content = content;
 }
Example #7
0
 protected virtual void Dispose(bool disposing) => _content = null;