public FolderImporterEventArgs(FolderImporterMessage message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            Message = message;
        }
Пример #2
0
        private void AddMessage(string eventName, string folderId = null, string folderName = null, string listId = null, string listName = null)
        {
            var message = new FolderImporterMessage();

            message.EventName  = eventName;
            message.FolderId   = folderId;
            message.FolderName = folderName;
            message.ListId     = listId;
            message.ListName   = listName;
            OnMessage?.Invoke(this, new FolderImporterEventArgs(message));
        }
Пример #3
0
        protected void AddMessage(string eventName, string folderId = null, string folderName = null, string listId = null, string listName = null, string rowId = null, string rowName = null, string blobId = null, string blobName = null)
        {
            var message = new FolderImporterMessage();

            message.EventName  = eventName;
            message.FolderId   = folderId;
            message.FolderName = folderName;
            message.ListId     = listId;
            message.ListName   = listName;
            message.RowId      = rowId;
            message.RowName    = rowName;
            message.BlobId     = blobId;
            message.BlobName   = blobName;
            OnMessage?.Invoke(this, new FolderImporterEventArgs(message));
        }
Пример #4
0
        private void AddError(Exception exception, string folderId = null, string folderName = null, string listId = null, string listName = null, string rowId = null, string rowName = null, string blobId = null, string blobName = null)
        {
            var message = new FolderImporterMessage();

            message.EventName  = "Error";
            message.FolderId   = folderId;
            message.FolderName = folderName;
            message.ListId     = listId;
            message.ListName   = listName;
            message.RowId      = rowId;
            message.RowName    = rowName;
            message.BlobId     = blobId;
            message.BlobName   = blobName;
            if (exception != null)
            {
                message.ExceptionMessage = exception.GetErrorText();
            }

            _errorMessages.Add(message);

            OnError?.Invoke(this, new FolderImporterEventArgs(message));
        }