Click or drag to resize

SourceManagerAddFiles Method

Note: This API is now obsolete.

Adds a selection of files as one or more sources to import.

Namespace:  Law.EdaIntegration.Import
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.3
Syntax
C#
[ObsoleteAttribute]
public void AddFiles(
	IEnumerable<string> fileList,
	int custodianId,
	string sourceName = ""
)

Parameters

fileList
Type: System.Collections.GenericIEnumerableString
A list of full-path file names
custodianId
Type: SystemInt32
The custodian for the resulting source(s)
sourceName (Optional)
Type: SystemString
An optional name for the newly created source. If no name is supplied it will default to the last directory name in the files path.
Exceptions
ExceptionCondition
EdaApiExceptionThrown if any of the files cannot be found
Remarks
In the event that the files in fileList are from different folders, each represented folder will have a new source created. In that situation, the sourceName will only be applied to the first source created and the subsequent sources will use the default value.
Examples
The following example demonstrates adding a list of files as one or more new document sources for a custodian.
C#
using Law.EdaIntegration;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);

        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        int custodianId = 21;
        List<string> filesToAdd = new List<string>
        {
            @"\\NetworkDrive\Folder1\HiddenWorksheet.xlsx",
            @"\\NetworkDrive\Folder1\SlidesWithNotes.pptx",
            @"\\NetworkDrive\Folder1\PPT_2003_slides.ppt",
        };
        edaCase.Sources.AddFiles(filesToAdd, custodianId);
    }
}
See Also