Переглянути джерело

Also use Interlocked.Increment(ref long) on Windows Phone.

drieseng 9 роки тому
батько
коміт
eb56b0fae8
1 змінених файлів з 1 додано та 10 видалено
  1. 1 10
      src/Renci.SshNet/Sftp/SftpSession.cs

+ 1 - 10
src/Renci.SshNet/Sftp/SftpSession.cs

@@ -45,16 +45,7 @@ namespace Renci.SshNet.Sftp
         {
             get
             {
-#if WINDOWS_PHONE
-                lock (this)
-                {
-                    this._requestId++;
-                }
-
-                return (uint)this._requestId;
-#else
-                return ((uint) Interlocked.Increment(ref _requestId));
-#endif
+                return (uint) Interlocked.Increment(ref _requestId);
             }
         }