diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2010-07-26 00:19:54 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2010-07-26 00:50:13 +0400 |
commit | cd51491631380ed56723fdfc66945213f9864b5a (patch) | |
tree | 05ebbd8cd16e55aae7d81003a3ba0c803eab8e1f /mcs/class/Npgsql | |
parent | 5c94b81517e934060ca88474eaefb2b516be734a (diff) |
Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller. I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
Diffstat (limited to 'mcs/class/Npgsql')
-rw-r--r-- | mcs/class/Npgsql/Npgsql/.gitattributes | 7 | ||||
-rw-r--r-- | mcs/class/Npgsql/Npgsql/NpgsqlClosedState.resx | 2 | ||||
-rw-r--r-- | mcs/class/Npgsql/Npgsql/NpgsqlConnectedState.resx | 2 | ||||
-rw-r--r-- | mcs/class/Npgsql/Npgsql/NpgsqlException.resx | 2 | ||||
-rw-r--r-- | mcs/class/Npgsql/Npgsql/NpgsqlParameterCollection.cs | 62 | ||||
-rw-r--r-- | mcs/class/Npgsql/Npgsql/NpgsqlReadyState.resx | 2 | ||||
-rw-r--r-- | mcs/class/Npgsql/Npgsql/NpgsqlTransaction.es.resx | 2 | ||||
-rw-r--r-- | mcs/class/Npgsql/Npgsql/NpgsqlTransaction.resx | 2 | ||||
-rw-r--r-- | mcs/class/Npgsql/NpgsqlTypes/.gitattributes | 1 | ||||
-rw-r--r-- | mcs/class/Npgsql/NpgsqlTypes/NpgsqlTypesHelper.resx | 2 |
10 files changed, 38 insertions, 46 deletions
diff --git a/mcs/class/Npgsql/Npgsql/.gitattributes b/mcs/class/Npgsql/Npgsql/.gitattributes index 19e81702c17..6907dc7576c 100644 --- a/mcs/class/Npgsql/Npgsql/.gitattributes +++ b/mcs/class/Npgsql/Npgsql/.gitattributes @@ -1,8 +1 @@ /Cache.cs -crlf -/NpgsqlClosedState.resx -crlf -/NpgsqlConnectedState.resx -crlf -/NpgsqlException.resx -crlf -/NpgsqlParameterCollection.cs -crlf -/NpgsqlReadyState.resx -crlf -/NpgsqlTransaction.es.resx -crlf -/NpgsqlTransaction.resx -crlf diff --git a/mcs/class/Npgsql/Npgsql/NpgsqlClosedState.resx b/mcs/class/Npgsql/Npgsql/NpgsqlClosedState.resx index 772df879e3f..c1c158cd8c1 100644 --- a/mcs/class/Npgsql/Npgsql/NpgsqlClosedState.resx +++ b/mcs/class/Npgsql/Npgsql/NpgsqlClosedState.resx @@ -57,7 +57,7 @@ value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. - -->
+ --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> diff --git a/mcs/class/Npgsql/Npgsql/NpgsqlConnectedState.resx b/mcs/class/Npgsql/Npgsql/NpgsqlConnectedState.resx index 17206e2936c..bdd5e999a25 100644 --- a/mcs/class/Npgsql/Npgsql/NpgsqlConnectedState.resx +++ b/mcs/class/Npgsql/Npgsql/NpgsqlConnectedState.resx @@ -57,7 +57,7 @@ value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. - -->
+ --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> diff --git a/mcs/class/Npgsql/Npgsql/NpgsqlException.resx b/mcs/class/Npgsql/Npgsql/NpgsqlException.resx index 1698867f759..cbbb4dcf913 100644 --- a/mcs/class/Npgsql/Npgsql/NpgsqlException.resx +++ b/mcs/class/Npgsql/Npgsql/NpgsqlException.resx @@ -57,7 +57,7 @@ value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. - -->
+ --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> diff --git a/mcs/class/Npgsql/Npgsql/NpgsqlParameterCollection.cs b/mcs/class/Npgsql/Npgsql/NpgsqlParameterCollection.cs index 03140387ebf..25756caa776 100644 --- a/mcs/class/Npgsql/Npgsql/NpgsqlParameterCollection.cs +++ b/mcs/class/Npgsql/Npgsql/NpgsqlParameterCollection.cs @@ -249,14 +249,14 @@ namespace Npgsql NpgsqlEventLog.LogMethodEnter(LogLevel.Debug, CLASSNAME, "IndexOf", parameterName); // Iterate values to see what is the index of parameter. - Int32 index = 0;
- if ((parameterName[0] == ':') || (parameterName[0] == '@'))
- parameterName = parameterName.Remove(0, 1);
-
- foreach (NpgsqlParameter parameter in this)
- {
- if (parameter.ParameterName.Remove(0, 1) == parameterName)
- return index;
+ Int32 index = 0; + if ((parameterName[0] == ':') || (parameterName[0] == '@')) + parameterName = parameterName.Remove(0, 1); + + foreach (NpgsqlParameter parameter in this) + { + if (parameter.ParameterName.Remove(0, 1) == parameterName) + return index; index++; } return -1; @@ -331,29 +331,29 @@ namespace Npgsql NpgsqlEventLog.LogMethodEnter(LogLevel.Debug, CLASSNAME, "Contains", value); CheckType(value); return this.InternalList.Contains(value); - }
-
- /// <summary>
- /// Gets a value indicating whether a <see cref="Npgsql.NpgsqlParameter">NpgsqlParameter</see> with the specified parameter name exists in the collection.
- /// </summary>
- /// <param name="parameterName">The name of the <see cref="Npgsql.NpgsqlParameter">NpgsqlParameter</see> object to find.</param>
- /// <param name="parameter">A reference to the requested parameter is returned in this out param if it is found in the list. This value is null if the parameter is not found.</param>
- /// <returns><b>true</b> if the collection contains the parameter and param will contain the parameter; otherwise, <b>false</b>.</returns>
- public bool TryGetValue(string parameterName, out NpgsqlParameter parameter)
- {
- NpgsqlEventLog.LogMethodEnter(LogLevel.Debug, CLASSNAME, "TryGetValue", parameterName);
- int index = IndexOf(parameterName);
- if (index != -1)
- {
- parameter = this[index];
- return true;
- }
- else
- {
- parameter = null;
- return false;
- }
- }
+ } + + /// <summary> + /// Gets a value indicating whether a <see cref="Npgsql.NpgsqlParameter">NpgsqlParameter</see> with the specified parameter name exists in the collection. + /// </summary> + /// <param name="parameterName">The name of the <see cref="Npgsql.NpgsqlParameter">NpgsqlParameter</see> object to find.</param> + /// <param name="parameter">A reference to the requested parameter is returned in this out param if it is found in the list. This value is null if the parameter is not found.</param> + /// <returns><b>true</b> if the collection contains the parameter and param will contain the parameter; otherwise, <b>false</b>.</returns> + public bool TryGetValue(string parameterName, out NpgsqlParameter parameter) + { + NpgsqlEventLog.LogMethodEnter(LogLevel.Debug, CLASSNAME, "TryGetValue", parameterName); + int index = IndexOf(parameterName); + if (index != -1) + { + parameter = this[index]; + return true; + } + else + { + parameter = null; + return false; + } + } /// <summary> /// Removes all items from the collection. diff --git a/mcs/class/Npgsql/Npgsql/NpgsqlReadyState.resx b/mcs/class/Npgsql/Npgsql/NpgsqlReadyState.resx index 84d2fec2037..1324af3a031 100644 --- a/mcs/class/Npgsql/Npgsql/NpgsqlReadyState.resx +++ b/mcs/class/Npgsql/Npgsql/NpgsqlReadyState.resx @@ -57,7 +57,7 @@ value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. - -->
+ --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> diff --git a/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.es.resx b/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.es.resx index 106638c7bb3..b230c76b8e6 100644 --- a/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.es.resx +++ b/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.es.resx @@ -57,7 +57,7 @@ value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. - -->
+ --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> diff --git a/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.resx b/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.resx index ce394ae88d8..bb2cde485ad 100644 --- a/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.resx +++ b/mcs/class/Npgsql/Npgsql/NpgsqlTransaction.resx @@ -57,7 +57,7 @@ value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. - -->
+ --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> diff --git a/mcs/class/Npgsql/NpgsqlTypes/.gitattributes b/mcs/class/Npgsql/NpgsqlTypes/.gitattributes deleted file mode 100644 index 04439158c99..00000000000 --- a/mcs/class/Npgsql/NpgsqlTypes/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -/NpgsqlTypesHelper.resx -crlf diff --git a/mcs/class/Npgsql/NpgsqlTypes/NpgsqlTypesHelper.resx b/mcs/class/Npgsql/NpgsqlTypes/NpgsqlTypesHelper.resx index 05439bfe965..fb8bdee860c 100644 --- a/mcs/class/Npgsql/NpgsqlTypes/NpgsqlTypesHelper.resx +++ b/mcs/class/Npgsql/NpgsqlTypes/NpgsqlTypesHelper.resx @@ -57,7 +57,7 @@ value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. - -->
+ --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> |