|
@@ -1,5 +1,4 @@
|
|
using System.Collections;
|
|
using System.Collections;
|
|
-using System.Collections.Generic;
|
|
|
|
using System.Runtime.InteropServices;
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
namespace WinSCP
|
|
namespace WinSCP
|
|
@@ -7,92 +6,8 @@ namespace WinSCP
|
|
[Guid("E402CB1F-6219-4C79-9EDF-1914D9589909")]
|
|
[Guid("E402CB1F-6219-4C79-9EDF-1914D9589909")]
|
|
[ClassInterface(Constants.ClassInterface)]
|
|
[ClassInterface(Constants.ClassInterface)]
|
|
[ComVisible(true)]
|
|
[ComVisible(true)]
|
|
- [ComDefaultInterface(typeof(IEnumerable))]
|
|
|
|
- public class StringCollection : ICollection<string>
|
|
|
|
|
|
+ [ComDefaultInterface(typeof(IEnumerable))] // See the comment at ReadOnlyInteropCollection
|
|
|
|
+ public class StringCollection : ReadOnlyInteropCollection<string>
|
|
{
|
|
{
|
|
- internal StringCollection()
|
|
|
|
- {
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public string this[int index]
|
|
|
|
- {
|
|
|
|
- get
|
|
|
|
- {
|
|
|
|
- return _helper[index];
|
|
|
|
- }
|
|
|
|
- set
|
|
|
|
- {
|
|
|
|
- _helper[index] = value;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #region ICollection<string> Members
|
|
|
|
-
|
|
|
|
- public void Add(string item)
|
|
|
|
- {
|
|
|
|
- _helper.Add(item);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void Clear()
|
|
|
|
- {
|
|
|
|
- _helper.Clear();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public bool Contains(string item)
|
|
|
|
- {
|
|
|
|
- return _helper.Contains(item);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void CopyTo(string[] array, int arrayIndex)
|
|
|
|
- {
|
|
|
|
- _helper.CopyTo(array, arrayIndex);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public int Count
|
|
|
|
- {
|
|
|
|
- get { return _helper.Count; }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public bool IsReadOnly
|
|
|
|
- {
|
|
|
|
- get { return _helper.IsReadOnly; }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public bool Remove(string item)
|
|
|
|
- {
|
|
|
|
- return _helper.Remove(item);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #endregion
|
|
|
|
-
|
|
|
|
- #region IEnumerable<SessionRemoteException> Members
|
|
|
|
-
|
|
|
|
- public IEnumerator<string> GetEnumerator()
|
|
|
|
- {
|
|
|
|
- return _helper.GetEnumerator();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #endregion
|
|
|
|
-
|
|
|
|
- #region IEnumerable Members
|
|
|
|
-
|
|
|
|
- IEnumerator IEnumerable.GetEnumerator()
|
|
|
|
- {
|
|
|
|
- return _helper.GetEnumerator();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #endregion
|
|
|
|
-
|
|
|
|
- internal void InternalAdd(string item)
|
|
|
|
- {
|
|
|
|
- _helper.InternalAdd(item);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- internal void InternalRemoveFirst()
|
|
|
|
- {
|
|
|
|
- _helper.InternalRemoveFirst();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private readonly ReadOnlyInteropCollectionHelper<string> _helper = new ReadOnlyInteropCollectionHelper<string>();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|