Skip to content

Commit

Permalink
analizators/s2365
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhorukovAnton committed Jan 19, 2022
1 parent cbab9c4 commit f2e33fa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions common/ASC.Core.Common/Configuration/Consumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public class Consumer : IDictionary<string, string>
protected readonly Dictionary<string, string> Props;
public IEnumerable<string> ManagedKeys
{
get { return Props.Select(r => r.Key).ToList(); }
get { return Props.Select(r => r.Key); }
}

protected readonly Dictionary<string, string> Additional;
public virtual IEnumerable<string> AdditionalKeys
{
get { return Additional.Select(r => r.Key).ToList(); }
get { return Additional.Select(r => r.Key); }
}

public ICollection<string> Keys { get { return AllProps.Keys; } }
Expand Down Expand Up @@ -336,7 +336,7 @@ public DataStoreConsumer(

public override IEnumerable<string> AdditionalKeys
{
get { return base.AdditionalKeys.Where(r => r != HandlerTypeKey && r != "cdn").ToList(); }
get { return base.AdditionalKeys.Where(r => r != HandlerTypeKey && r != "cdn"); }
}

protected override string GetSettingsKey(string name)
Expand Down
6 changes: 3 additions & 3 deletions common/services/ASC.ElasticSearch/Core/SearchSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ public List<SearchSettingsItem> GetAllItems()
}).ToList();
}

private List<IFactoryIndexer> allItems;
internal List<IFactoryIndexer> AllItems
private IEnumerable<IFactoryIndexer> allItems;
internal IEnumerable<IFactoryIndexer> AllItems
{
get
{
return allItems ??= ServiceProvider.GetService<IEnumerable<IFactoryIndexer>>().ToList();
return allItems ??= ServiceProvider.GetService<IEnumerable<IFactoryIndexer>>();
}
}

Expand Down
26 changes: 13 additions & 13 deletions web/ASC.Web.Core/Files/FileUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ public FileUtilityConfiguration(IConfiguration configuration)
}

private List<string> extsIndexing;
public List<string> ExtsIndexing { get => extsIndexing ??= (Configuration.GetSection("files:index").Get<string[]>() ?? Array.Empty<string>()).ToList(); }
public List<string> ExtsIndexing { get => extsIndexing ??= Configuration.GetSection("files:index").Get<List<string>>() ?? new List<string>(); }

private List<string> extsImagePreviewed;
public List<string> ExtsImagePreviewed { get => extsImagePreviewed ??= (Configuration.GetSection("files:viewed-images").Get<string[]>() ?? Array.Empty<string>()).ToList(); }
public List<string> ExtsImagePreviewed { get => extsImagePreviewed ??= Configuration.GetSection("files:viewed-images").Get<List<string>>() ?? new List<string>(); }

private List<string> extsMediaPreviewed;
public List<string> ExtsMediaPreviewed { get => extsMediaPreviewed ??= (Configuration.GetSection("files:viewed-media").Get<string[]>() ?? Array.Empty<string>()).ToList(); }
public List<string> ExtsMediaPreviewed { get => extsMediaPreviewed ??= Configuration.GetSection("files:viewed-media").Get<List<string>>() ?? new List<string>(); }

private List<string> extsWebPreviewed;
public List<string> ExtsWebPreviewed
{
get
{
return extsWebPreviewed ??= (Configuration.GetSection("files:docservice:viewed-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsWebPreviewed ??= Configuration.GetSection("files:docservice:viewed-docs").Get<List<string>>() ?? new List<string>();
}
}

Expand All @@ -71,19 +71,19 @@ public List<string> ExtsWebEdited
{
get
{
return extsWebEdited ??= (Configuration.GetSection("files:docservice:edited-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsWebEdited ??= Configuration.GetSection("files:docservice:edited-docs").Get<List<string>>() ?? new List<string>();
}
}

private List<string> extsWebEncrypt;
public List<string> ExtsWebEncrypt { get => extsWebEncrypt ??= (Configuration.GetSection("files:docservice:encrypted-docs").Get<string[]>() ?? Array.Empty<string>()).ToList(); }
public List<string> ExtsWebEncrypt { get => extsWebEncrypt ??= Configuration.GetSection("files:docservice:encrypted-docs").Get<List<string>>() ?? new List<string>(); }

private List<string> extsWebReviewed;
public List<string> ExtsWebReviewed
{
get
{
return extsWebReviewed ??= (Configuration.GetSection("files:docservice:reviewed-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsWebReviewed ??= Configuration.GetSection("files:docservice:reviewed-docs").Get<List<string>>() ?? new List<string>();
}
}

Expand All @@ -92,7 +92,7 @@ public List<string> ExtsWebCustomFilterEditing
{
get
{
return extsWebCustomFilterEditing ??= (Configuration.GetSection("files:docservice:customfilter-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsWebCustomFilterEditing ??= Configuration.GetSection("files:docservice:customfilter-docs").Get<List<string>>() ?? new List<string>();
}
}

Expand All @@ -101,7 +101,7 @@ public List<string> ExtsWebRestrictedEditing
{
get
{
return extsWebRestrictedEditing ??= (Configuration.GetSection("files:docservice:formfilling-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsWebRestrictedEditing ??= Configuration.GetSection("files:docservice:formfilling-docs").Get<List<string>>() ?? new List<string>();
}
}

Expand All @@ -110,7 +110,7 @@ public List<string> ExtsWebCommented
{
get
{
return extsWebCommented ??= (Configuration.GetSection("files:docservice:commented-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsWebCommented ??= Configuration.GetSection("files:docservice:commented-docs").Get<List<string>>() ?? new List<string>();
}
}

Expand All @@ -119,7 +119,7 @@ public List<string> ExtsWebTemplate
{
get
{
return extsWebTemplate ??= (Configuration.GetSection("files:docservice:template-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsWebTemplate ??= Configuration.GetSection("files:docservice:template-docs").Get<List<string>>() ?? new List<string>();
}
}

Expand All @@ -128,14 +128,14 @@ public List<string> ExtsMustConvert
{
get
{
return extsMustConvert ??= (Configuration.GetSection("files:docservice:convert-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
return extsMustConvert ??= Configuration.GetSection("files:docservice:convert-docs").Get<List<string>>() ?? new List<string>();
}
}

private List<string> extsCoAuthoring;
public List<string> ExtsCoAuthoring
{
get => extsCoAuthoring ??= (Configuration.GetSection("files:docservice:coauthor-docs").Get<string[]>() ?? Array.Empty<string>()).ToList();
get => extsCoAuthoring ??= Configuration.GetSection("files:docservice:coauthor-docs").Get<List<string>>() ?? new List<string>();
}

public Dictionary<FileType, string> InternalExtension
Expand Down

0 comments on commit f2e33fa

Please sign in to comment.