Released windows auth, connect to ES.Services.
This commit is contained in:
parent
2569e55609
commit
d29c347ff4
294 changed files with 329583 additions and 2315 deletions
|
@ -0,0 +1,29 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WebsitePanel.WebDavPortal.Config;
|
||||
using WebsitePanel.WebDavPortal.Extensions;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.FileOperations
|
||||
{
|
||||
public class FileOpenerManager
|
||||
{
|
||||
private readonly IDictionary<string, FileOpenerType> _operationTypes = new Dictionary<string, FileOpenerType>();
|
||||
|
||||
public FileOpenerManager()
|
||||
{
|
||||
if (WebDavAppConfigManager.Instance.OfficeOnline.IsEnabled)
|
||||
_operationTypes.AddRange(WebDavAppConfigManager.Instance.OfficeOnline.ToDictionary(x => x, y => FileOpenerType.OfficeOnline));
|
||||
}
|
||||
|
||||
public FileOpenerType this[string fileExtension]
|
||||
{
|
||||
get
|
||||
{
|
||||
FileOpenerType result;
|
||||
if (_operationTypes.TryGetValue(fileExtension, out result))
|
||||
return result;
|
||||
return FileOpenerType.Download;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue