Differences

This shows you the differences between the selected revisions of the page.

2014-07-14 2014-08-04
updating comment for Dispose method (martin) american spelling + typos (martin)
Line 27: Line 27:
| string DebugLogPath | Path to store assembly debug log to. Default ''null'' means, no debug log file is created. See also ''SessionLogPath''. The property has to be set before calling ''Open''. | | string DebugLogPath | Path to store assembly debug log to. Default ''null'' means, no debug log file is created. See also ''SessionLogPath''. The property has to be set before calling ''Open''. |
| bool DefaultConfiguration | Should WinSCP be forced with the default [[config|configuration]]? ''true'' by default. Useful to isolate the console session run from any configuration stored on this machine. Set to ''false'' only in an exceptional scenarios. The property has to be set before calling ''Open''. | | bool DefaultConfiguration | Should WinSCP be forced with the default [[config|configuration]]? ''true'' by default. Useful to isolate the console session run from any configuration stored on this machine. Set to ''false'' only in an exceptional scenarios. The property has to be set before calling ''Open''. |
-| bool DisableVersionCheck | Disables test that WinSCP [[executables|executables]] have the same product version as this assembly.((Note, even if you set this property, you need to use the assembly with compatible WinSCP executable only. Otherwise the behaviour is unpredictable. In general, it is not recommended to use this. In neither case you will be able to use the assembly with WinSCP 5.0.4 or older.)) The property has to be set before calling ''Open''. |+| bool DisableVersionCheck | Disables test that WinSCP [[executables|executables]] have the same product version as this assembly.((Note, even if you set this property, you need to use the assembly with compatible WinSCP executable only. Otherwise the behavior is unpredictable. In general, it is not recommended to use this. In neither case you will be able to use the assembly with WinSCP 5.0.4 or older.)) The property has to be set before calling ''Open''. |
| string ExecutablePath | Path to ''[[executables#winscp.exe|winscp.exe]]''. The default is ''null'', meaning that ''winscp.exe'' is looked for in the same directory as this assembly or in an installation folder. The property has to be set before calling ''Open''. | | string ExecutablePath | Path to ''[[executables#winscp.exe|winscp.exe]]''. The default is ''null'', meaning that ''winscp.exe'' is looked for in the same directory as this assembly or in an installation folder. The property has to be set before calling ''Open''. |
| string IniFilePath | Path to an INI file. Used only when ''DefaultConfiguration'' is ''false''. When ''null'', default WinSCP configuration storage is used, meaning INI file, if any is present in WinSCP startup directory, or Windows Registry otherwise. The property has to be set before calling ''Open''. | | string IniFilePath | Path to an INI file. Used only when ''DefaultConfiguration'' is ''false''. When ''null'', default WinSCP configuration storage is used, meaning INI file, if any is present in WinSCP startup directory, or Windows Registry otherwise. The property has to be set before calling ''Open''. |
Line 58: Line 58:
| [[library_session_failed|Failed]] | Occurs on error during any operation. | | [[library_session_failed|Failed]] | Occurs on error during any operation. |
| [[library_session_filetransferprogress|FileTransferProgress]] | Occurs regularly during file transfer to report transfer progress. | | [[library_session_filetransferprogress|FileTransferProgress]] | Occurs regularly during file transfer to report transfer progress. |
-| [[library_session_filetransferred|FileTransferred]] | Occurs when file is transfered. |+| [[library_session_filetransferred|FileTransferred]] | Occurs when file is transferred. |
| [[library_session_outputdatareceived|OutputDataReceived]] | Occurs on output from WinSCP console session.  | | [[library_session_outputdatareceived|OutputDataReceived]] | Occurs on output from WinSCP console session.  |
Line 77: Line 77:
Methods from both classes throw ''[[library_sessionlocalexception|SessionLocalException]]'' on error in communication with WinSCP console session. Methods from both classes throw ''[[library_sessionlocalexception|SessionLocalException]]'' on error in communication with WinSCP console session.
-Methods for atomic operations throw ''[[library_sessionremoteexception|SessionRemoteException]]'' on error originating from WinSCP console session (refered to as "failure" below).+Methods for atomic operations throw ''[[library_sessionremoteexception|SessionRemoteException]]'' on error originating from WinSCP console session (referred to as "failure" below).
Methods for batch operations returns an instance of descendant of ''[[library_operationresultbase|OperationResultBase]]'' class (such as ''[[library_transferoperationresult|TransferOperationResult]]'' or ''[[library_synchronizationresult|SynchronizationResult]]''). Such result class stores list of operations performed (e.g. ''TransferOperationResult.Uploads''), and list of failures (''OperationResultBase.Failures''). Methods for batch operations returns an instance of descendant of ''[[library_operationresultbase|OperationResultBase]]'' class (such as ''[[library_transferoperationresult|TransferOperationResult]]'' or ''[[library_synchronizationresult|SynchronizationResult]]''). Such result class stores list of operations performed (e.g. ''TransferOperationResult.Uploads''), and list of failures (''OperationResultBase.Failures'').
Line 85: Line 85:
But there can be failures that cannot be explicitly associated with any operation represented in results. An example is an error when listing contents of remote directory to determine list of files to downloads. The listing is not represented in the results, so the failure will be included only in a generic list of failures. But there can be failures that cannot be explicitly associated with any operation represented in results. An example is an error when listing contents of remote directory to determine list of files to downloads. The listing is not represented in the results, so the failure will be included only in a generic list of failures.
-If you do not want to check the list of failures after every batch operation method call, you can use method ''[[library_operationresultbase|OperationResultBase]].Check'' to throw the first failure in the list, if any failure occured:+If you do not want to check the list of failures after every batch operation method call, you can use method ''[[library_operationresultbase|OperationResultBase]].Check'' to throw the first failure in the list, if any failure occurred:
<code csharp> <code csharp>

Last modified: by martin