Class SupportFolders
Represents a list of support folders for the document.
Inheritance
Implements
Inherited Members
Namespace: netDxf.Collections
Assembly: CADability.dll
Syntax
public class SupportFolders : IList<string>, ICollection<string>, IEnumerable<string>, IEnumerable
Constructors
| Improve this Doc View SourceSupportFolders()
Initializes a new instance of SupportFolders class.
Declaration
public SupportFolders()
SupportFolders(IEnumerable<String>)
Initializes a new instance of SupportFolders class.
Declaration
public SupportFolders(IEnumerable<string> folders)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<System.String> | folders | The collection whose elements should be added to the list. The items in the collection cannot be null. |
SupportFolders(Int32)
Initializes a new instance of SupportFolders class.
Declaration
public SupportFolders(int capacity)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | capacity | Initial capacity of the list. |
Properties
| Improve this Doc View SourceCount
Gets the number of elements contained in the list.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The number of elements contained in the list. |
IsReadOnly
Returns if the list is read only.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Return always true. |
Item[Int32]
Gets or sets the element at the specified index.
Declaration
public string this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The zero-based index of the element to get or set. |
Property Value
| Type | Description |
|---|---|
| System.String | The element at the specified index. |
Methods
| Improve this Doc View SourceAdd(String)
Adds an item to the list.
Declaration
public void Add(string item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | item | Folder path to add to the list. The item cannot be null. |
AddRange(IEnumerable<String>)
Adds the elements of the collection to the list.
Declaration
public void AddRange(IEnumerable<string> collection)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<System.String> | collection | The collection whose elements should be added to the end of the list. The items in the collection cannot be null. |
Clear()
Removes all elements from the list.
Declaration
public void Clear()
Contains(String)
Determines whether an element is in the list.
Declaration
public bool Contains(string item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | item | The object to locate in the list. The value cannot be null. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the item is found in the list; otherwise, false. |
CopyTo(String[], Int32)
Copies the entire list to a compatible one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(string[] array, int arrayIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | array | The one-dimensional array that is the destination of the elements copied from list. The array must have zero-based indexing. |
| System.Int32 | arrayIndex | The zero-based index in the array at which copying begins. |
FindFile(String)
Looks for a file in one of the support folders.
Declaration
public string FindFile(string file)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | file | File name to find in one of the support folders. |
Returns
| Type | Description |
|---|---|
| System.String | The path to the file found in one of the support folders. It includes both the path and the specified file name. |
Remarks
If the specified file already exists it return the same value, if neither it cannot be found in any of the support folders it will return an empty string.
GetEnumerator()
Returns an enumerator that iterates through the list.
Declaration
public IEnumerator<string> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<System.String> | The enumerator for the list. |
IndexOf(String)
Determines the index of a specific item in the list.
Declaration
public int IndexOf(string item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | item | The object to locate in the list. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The index of |
Insert(Int32, String)
Inserts an item to the list at the specified index.
Declaration
public void Insert(int index, string item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The zero-based index at which the item should be inserted. |
| System.String | item | The object to insert into the list. |
Remove(String)
Removes the first occurrence of a specific object from the list.
Declaration
public bool Remove(string item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | item | The object to remove from the list. The value cannot be null. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the item is successfully removed; otherwise, false. This method also returns false the item was not found in the list. |
RemoveAt(Int32)
Removes the item at the specified index from the list.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The zero-based index of the item to remove. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Returns an enumerator that iterates through the list.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | The enumerator for the list. |