CmisSync.Lib.Storage.Database.Entities.FileTransmissionObject.FileTransmissionObject C# (CSharp) Метод

FileTransmissionObject() публичный Метод

Initializes a new instance of the CmisSync.Lib.Storage.Database.Entities.FileTransmissionObject class.
public FileTransmissionObject ( TransmissionType type, IFileInfo localFile, IDocument remoteFile ) : System
type TransmissionType Type of transmission.
localFile IFileInfo Local file.
remoteFile IDocument Remote file.
Результат System
        public FileTransmissionObject(TransmissionType type, IFileInfo localFile, IDocument remoteFile) {
            if (localFile == null) {
                throw new ArgumentNullException("localFile");
            }

            if (!localFile.Exists) {
                throw new ArgumentException(string.Format("'{0} file does not exist", localFile.FullName), "localFile");
            }

            if (remoteFile == null) {
                throw new ArgumentNullException("remoteFile");
            }

            if (remoteFile.Id == null) {
                throw new ArgumentNullException("remoteFile.Id");
            }

            if (string.IsNullOrEmpty(remoteFile.Id)) {
                throw new ArgumentException("empty string", "remoteFile.Id");
            }

            this.Type = type;
            this.LocalPath = localFile.FullName;
            this.LastContentSize = localFile.Length;
            this.LastLocalWriteTimeUtc = localFile.LastWriteTimeUtc;
            this.RemoteObjectId = remoteFile.Id;
            this.LastChangeToken = remoteFile.ChangeToken;
            this.RemoteObjectPWCId = remoteFile.VersionSeriesCheckedOutId;
            this.LastRemoteWriteTimeUtc = remoteFile.LastModificationDate;
            if (this.LastRemoteWriteTimeUtc != null) {
                this.LastRemoteWriteTimeUtc = this.LastRemoteWriteTimeUtc.GetValueOrDefault().ToUniversalTime();
            }
        }

Same methods

FileTransmissionObject::FileTransmissionObject ( ) : System