Beispiel #1
0
        public void SaveToXML(System.Xml.XmlDocument doc, IDTSInfoEvents infoEvents)
        {
            XmlElement taskElement = doc.CreateElement(string.Empty, "SSHFTPTask", string.Empty);

            XmlAttribute SSHconnMgrNameAttribute = doc.CreateAttribute(string.Empty, "SSHconnMgrName", string.Empty);

            SSHconnMgrNameAttribute.Value = _SSHconnMgrName;

            XmlAttribute sendFilesSourceConnectionManagerNameAttribute = doc.CreateAttribute(string.Empty, "sendFilesSourceConnectionManagerName", string.Empty);

            sendFilesSourceConnectionManagerNameAttribute.Value = _sendFilesSourceConnectionManagerName;

            XmlAttribute sendFilesDestinationDirectoryAttribute = doc.CreateAttribute(string.Empty, "sendFilesDestinationDirectory", string.Empty);

            sendFilesDestinationDirectoryAttribute.Value = _sendFilesDestinationDirectory;

            XmlAttribute receiveFilesDestinationConnectionManagerNameAttribute = doc.CreateAttribute(string.Empty, "receiveFilesDestinationConnectionManagerName", string.Empty);

            receiveFilesDestinationConnectionManagerNameAttribute.Value = _receiveFilesDestinationConnectionManagerName;

            XmlAttribute receiveFilesSourceFileAttribute = doc.CreateAttribute(string.Empty, "receiveFilesSourceFile", string.Empty);

            receiveFilesSourceFileAttribute.Value = _receiveFilesSourceFile;

            XmlAttribute operationAttribute = doc.CreateAttribute(string.Empty, "operation", string.Empty);

            operationAttribute.Value = _operation.ToString();

            taskElement.Attributes.Append(SSHconnMgrNameAttribute);
            taskElement.Attributes.Append(sendFilesSourceConnectionManagerNameAttribute);
            taskElement.Attributes.Append(sendFilesDestinationDirectoryAttribute);
            taskElement.Attributes.Append(receiveFilesDestinationConnectionManagerNameAttribute);
            taskElement.Attributes.Append(receiveFilesSourceFileAttribute);
            taskElement.Attributes.Append(operationAttribute);
            doc.AppendChild(taskElement);
        }