ItemSpecificationBuilder.AddContentSpecification Method (FileSystemInfo)
|
|
| MultiArchive SDK .NET Documentation |
| ItemSpecificationBuilder..::..AddContentSpecification Method (FileSystemInfo) |
| ItemSpecificationBuilder Class Example See Also Send Feedback |
|
|
[This is preliminary documentation and is subject to change.]
Method that creates a new ContentSpecification based on a physical file on the local filesystem.
Namespace: MultiArchive.SDK.ServiceUtils
Assembly: MultiArchive.SDK (in MultiArchive.SDK.dll) Version: 1.2.30.413 (1.2.30.413)
Syntax
| C# |
|---|
public void AddContentSpecification( FileSystemInfo content ) |
| Visual Basic |
|---|
Public Sub AddContentSpecification ( content As FileSystemInfo ) |
| Visual C++ |
|---|
public: void AddContentSpecification( FileSystemInfo^ content ) |
Parameters
- content
- Type: System.IO..::..FileSystemInfo
A reference to a physical file on the local filesystem which is to be attached to the created item.
Examples
| C# |
|
|---|---|
class TestClass { public static void Main() { ItemSpecificationBuilder myBuilder = new ItemSpecificationBuilder(); FileInfo info = new FileInfo(@"C:\HelloWorld.txt"); myBuilder.AddContentSpecification(info); } } |
|
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentException | Throws an ArgumentException if a content file is not specified. |
| MultiArchive.SDK.Services.Exceptions..::..ItemException | Throws an ItemException if the file specified or its directories does not exist. |
See Also