예제 #1
0
 public Packet(String usr, DateTime dt, String name, String hash, WatcherInfoType type, int sender)
 {
     if (0 == sender)
     {
         this.user     = usr;
         this.date     = dt;
         this.fileName = name.Replace("\\", "\\\\");
         this.fileHash = hash;
         this.iType    = type;
         if (!IsExitPacket())
         {
             if (type == WatcherInfoType.FILE_CREATED | type == WatcherInfoType.FILE_CHANGED)
             {
                 this.fileContent = getFileContents(name);
             }
         }
     }
     else
     {
         this.user     = usr;
         this.date     = dt;
         this.fileName = name;
         this.fileHash = hash;
         this.iType    = type;
     }
 }
예제 #2
0
 public Packet(String usr, DateTime dt, String name, String oldName, String hash, WatcherInfoType type, int sender)
     : this(usr, dt, name, hash, type, sender)
 {
     if (0 == sender)
     {
         this.oldFileName = oldName.Replace("\\", "\\\\");
     }
     else
     {
         this.oldFileName = oldName;
     }
 }
예제 #3
0
 public Packet(String usr, DateTime dt, String name, String hash, WatcherInfoType type)
     : this(usr, dt, name, hash, type, 0)
 {
 }
예제 #4
0
 public Packet(String usr, DateTime dt, String name, String oldName, String hash, WatcherInfoType type)
     : this(usr, dt, name, oldName, hash, type, 0)
 {
     //this.oldFileName = oldName.Replace("\\", "\\\\");
 }