-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 'PathOptions' to possbile options to allow specific paths have …
…different blocking rules.
- Loading branch information
Showing
15 changed files
with
1,015 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="OptionBase.cs" company="Marcin Smółka zNET Computer Solutions"> | ||
// Copyright (c) Marcin Smółka zNET Computer Solutions. All rights reserved. | ||
// </copyright> | ||
// <summary> | ||
// The option base. | ||
// </summary> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace ZNetCS.AspNetCore.IPFiltering | ||
{ | ||
#region Usings | ||
|
||
using System.Collections.Generic; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Net; | ||
|
||
#endregion | ||
|
||
/// <summary> | ||
/// The option base. | ||
/// </summary> | ||
public abstract class OptionBase | ||
{ | ||
#region Public Properties | ||
|
||
/// <summary> | ||
/// Gets or sets the blacklist. | ||
/// </summary> | ||
[SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Options serialization.")] | ||
public ICollection<string> Blacklist { get; set; } = new List<string>(); | ||
|
||
/// <summary> | ||
/// Gets or sets the default block level. | ||
/// </summary> | ||
public DefaultBlockLevel DefaultBlockLevel { get; set; } = DefaultBlockLevel.All; | ||
|
||
/// <summary> | ||
/// Gets or sets the http status code. | ||
/// </summary> | ||
public HttpStatusCode HttpStatusCode { get; set; } = HttpStatusCode.NotFound; | ||
|
||
/// <summary> | ||
/// Gets or sets the whitelist. | ||
/// </summary> | ||
[SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Options serialization.")] | ||
public ICollection<string> Whitelist { get; set; } = new List<string>(); | ||
|
||
#endregion | ||
} | ||
} |
Oops, something went wrong.