The Labs \ Source Viewer \ SSCLI \ System.Configuration.Internal \ FileVersion

  1. //------------------------------------------------------------------------------
  2. // <copyright file="FileVersion.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Configuration.Internal
  16. {
  17.     using System.Configuration;
  18.     using System.IO;
  19.     using System.Security.Permissions;
  20.     using System.Reflection;
  21.     using System.Threading;
  22.     using System.Security;
  23.     using System.CodeDom.Compiler;
  24.     using Microsoft.Win32;
  25.    
  26.     internal class FileVersion
  27.     {
  28.         bool _exists;
  29.         long _fileSize;
  30.         DateTime _utcCreationTime;
  31.         DateTime _utcLastWriteTime;
  32.        
  33.         internal FileVersion(bool exists, long fileSize, DateTime utcCreationTime, DateTime utcLastWriteTime)
  34.         {
  35.             _exists = exists;
  36.             _fileSize = fileSize;
  37.             _utcCreationTime = utcCreationTime;
  38.             _utcLastWriteTime = utcLastWriteTime;
  39.         }
  40.        
  41.         public override bool Equals(object obj)
  42.         {
  43.             FileVersion other = obj as FileVersion;
  44.             return other != null && _exists == other._exists && _fileSize == other._fileSize && _utcCreationTime == other._utcCreationTime && _utcLastWriteTime == other._utcLastWriteTime;
  45.         }
  46.        
  47.         public override int GetHashCode()
  48.         {
  49.             return base.GetHashCode();
  50.         }
  51.     }
  52. }

Developer Fusion