mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Remove tabs, indent code properly
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
This commit is contained in:
committed by
UbitUmarov
parent
e1ce7408da
commit
13dbbc2683
@@ -33,7 +33,7 @@ namespace OSHttpServer
|
||||
/// <param name="name">form name.</param>
|
||||
/// <param name="ignoreChanges">if set to <c>true</c> all changes will be ignored. </param>
|
||||
/// <remarks>this constructor should only be used by Empty</remarks>
|
||||
protected HttpInput(string name, bool ignoreChanges)
|
||||
protected HttpInput(string name, bool ignoreChanges)
|
||||
{
|
||||
_name = name;
|
||||
_ignoreChanges = ignoreChanges;
|
||||
|
||||
@@ -17,18 +17,18 @@ namespace OSHttpServer
|
||||
/// </remarks>
|
||||
public class HttpInputItem : IHttpInput
|
||||
{
|
||||
/// <summary> Representation of a non-initialized <see cref="HttpInputItem"/>.</summary>
|
||||
/// <summary> Representation of a non-initialized <see cref="HttpInputItem"/>.</summary>
|
||||
public static readonly HttpInputItem Empty = new HttpInputItem(string.Empty, true);
|
||||
private readonly IDictionary<string, HttpInputItem> _items = new Dictionary<string, HttpInputItem>();
|
||||
private readonly List<string> _values = new List<string>();
|
||||
private string _name;
|
||||
private readonly bool _ignoreChanges;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes an input item setting its name/identifier and value
|
||||
/// </summary>
|
||||
/// <param name="name">Parameter name/id</param>
|
||||
/// <param name="value">Parameter value</param>
|
||||
|
||||
/// <summary>
|
||||
/// Initializes an input item setting its name/identifier and value
|
||||
/// </summary>
|
||||
/// <param name="name">Parameter name/id</param>
|
||||
/// <param name="value">Parameter value</param>
|
||||
public HttpInputItem(string name, string value)
|
||||
{
|
||||
Name = name;
|
||||
@@ -41,20 +41,20 @@ namespace OSHttpServer
|
||||
_ignoreChanges = ignore;
|
||||
}
|
||||
|
||||
/// <summary>Creates a deep copy of the item specified</summary>
|
||||
/// <param name="item">The item to copy</param>
|
||||
/// <remarks>The function makes a deep copy of quite a lot which can be slow</remarks>
|
||||
public HttpInputItem(HttpInputItem item)
|
||||
{
|
||||
foreach (KeyValuePair<string, HttpInputItem> pair in item._items)
|
||||
_items.Add(pair.Key, pair.Value);
|
||||
|
||||
foreach (string value in item._values)
|
||||
_values.Add(value);
|
||||
|
||||
_ignoreChanges = item._ignoreChanges;
|
||||
_name = item.Name;
|
||||
}
|
||||
/// <summary>Creates a deep copy of the item specified</summary>
|
||||
/// <param name="item">The item to copy</param>
|
||||
/// <remarks>The function makes a deep copy of quite a lot which can be slow</remarks>
|
||||
public HttpInputItem(HttpInputItem item)
|
||||
{
|
||||
foreach (KeyValuePair<string, HttpInputItem> pair in item._items)
|
||||
_items.Add(pair.Key, pair.Value);
|
||||
|
||||
foreach (string value in item._values)
|
||||
_values.Add(value);
|
||||
|
||||
_ignoreChanges = item._ignoreChanges;
|
||||
_name = item.Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Number of values
|
||||
@@ -147,16 +147,16 @@ namespace OSHttpServer
|
||||
return _items.ContainsKey(name) && _items[name].Value != null;
|
||||
}
|
||||
|
||||
/// <summary> Returns a formatted representation of the instance with the values of all contained parameters </summary>
|
||||
/// <summary> Returns a formatted representation of the instance with the values of all contained parameters </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
return ToString(string.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Outputs the string in a formatted manner
|
||||
/// </summary>
|
||||
/// <param name="prefix">A prefix to append, used internally</param>
|
||||
/// <summary>
|
||||
/// Outputs the string in a formatted manner
|
||||
/// </summary>
|
||||
/// <param name="prefix">A prefix to append, used internally</param>
|
||||
/// <param name="asQuerySting">produce a query string</param>
|
||||
public string ToString(string prefix, bool asQuerySting)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OSHttpServer
|
||||
|
||||
private List<HttpInputItem> _items = new List<HttpInputItem>();
|
||||
|
||||
/// <summary>Initialises the class to hold a value either from a post request or a querystring request</summary>
|
||||
/// <summary>Initialises the class to hold a value either from a post request or a querystring request</summary>
|
||||
public HttpParam(IHttpInput form, IHttpInput query)
|
||||
{
|
||||
m_form = form;
|
||||
|
||||
@@ -49,15 +49,15 @@ namespace OSHttpServer
|
||||
/// </summary>
|
||||
event EventHandler<HeaderEventArgs> HeaderReceived;
|
||||
|
||||
/// <summary>
|
||||
/// Clear parser state.
|
||||
/// </summary>
|
||||
void Clear();
|
||||
/// <summary>
|
||||
/// Clear parser state.
|
||||
/// </summary>
|
||||
void Clear();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the log writer.
|
||||
/// </summary>
|
||||
ILogWriter LogWriter { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the log writer.
|
||||
/// </summary>
|
||||
ILogWriter LogWriter { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -146,10 +146,10 @@ namespace OSHttpServer
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Remove a cookie from the collection.
|
||||
/// </summary>
|
||||
/// <param name="cookieName">Name of cookie.</param>
|
||||
/// <summary>
|
||||
/// Remove a cookie from the collection.
|
||||
/// </summary>
|
||||
/// <param name="cookieName">Name of cookie.</param>
|
||||
public void Remove(string cookieName)
|
||||
{
|
||||
lock (_items)
|
||||
|
||||
Reference in New Issue
Block a user