webdav portal fixes
This commit is contained in:
parent
682e4ac18a
commit
c78570eb11
15 changed files with 177 additions and 14 deletions
|
@ -0,0 +1,38 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
|
||||
using WebsitePanel.WebDavPortal.WebConfigSections;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.Entities
|
||||
{
|
||||
public class OpenerCollection : AbstractConfigCollection, IReadOnlyCollection<OpenerElement>
|
||||
{
|
||||
private readonly IList<OpenerElement> _targetBlankMimeTypeExtensions;
|
||||
|
||||
public OpenerCollection()
|
||||
{
|
||||
_targetBlankMimeTypeExtensions = ConfigSection.TypeOpener.Cast<OpenerElement>().ToList();
|
||||
}
|
||||
|
||||
public IEnumerator<OpenerElement> GetEnumerator()
|
||||
{
|
||||
return _targetBlankMimeTypeExtensions.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return _targetBlankMimeTypeExtensions.Count; }
|
||||
}
|
||||
|
||||
public bool Contains(string extension)
|
||||
{
|
||||
return _targetBlankMimeTypeExtensions.Any(x => x.Extension == extension);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue