Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 3
0
 public Packet(String usr, DateTime dt, String name, String hash, WatcherInfoType type)
     : this(usr, dt, name, hash, type, 0)
 {
 }
Exemplo n.º 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("\\", "\\\\");
 }