Compare commits

...
Author SHA1 Message Date
nobody 72b6c41eeb This commit was manufactured by cvs2svn to create tag 'MONO_1_0_1'.
svn path=/tags/MONO_1_0_1/mono/; revision=31806
2004-08-03 14:55:15 +00:00
141 changed files with 682 additions and 1560 deletions

No files matched your search

@@ -1,8 +1,3 @@
2004-07-22 Jambunathan K <[email protected]>
* Constants.cs: Fixed definitions of vbCr, vbLf, vbCrLf and
vbNewLine
2004-06-24 Jambunathan K <[email protected]>
* RandomVBFile.cs: Fixed FileGet() for Date and Decimal types
* FileSystem.cs: Fixed ChDir, FileCopy
@@ -1,11 +1,11 @@
//
// Constants.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
//
// Constants.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
//
// Copyright (c) 2002-2003 Mainsoft Corporation.
@@ -30,131 +30,131 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Microsoft.VisualBasic {
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Constants {
// Declarations
public const System.Int32 vbObjectError = (System.Int32)(-2147221504);
public const System.String vbCrLf = "\r\n";
public const System.String vbNewLine = "\r\n";
public const System.String vbCr = "\r";
public const System.String vbLf = "\n";
public const System.String vbBack = "\b";
public const System.String vbFormFeed = "\f";
public const System.String vbTab = "\t";
public const System.String vbVerticalTab = "\v";
public const System.String vbNullChar = "\0";
public const System.String vbNullString = "";
public const AppWinStyle vbHide = AppWinStyle.Hide;
public const AppWinStyle vbNormalFocus = AppWinStyle.NormalFocus;
public const AppWinStyle vbMinimizedFocus = AppWinStyle.MinimizedFocus;
public const AppWinStyle vbMaximizedFocus = AppWinStyle.MaximizedFocus;
public const AppWinStyle vbNormalNoFocus = AppWinStyle.NormalNoFocus;
public const AppWinStyle vbMinimizedNoFocus = AppWinStyle.MinimizedNoFocus;
public const CallType vbMethod = CallType.Method;
public const CallType vbGet = CallType.Get;
public const CallType vbLet = CallType.Let;
public const CallType vbSet = CallType.Set;
public const CompareMethod vbBinaryCompare = CompareMethod.Binary;
public const CompareMethod vbTextCompare = CompareMethod.Text;
public const DateFormat vbGeneralDate = DateFormat.GeneralDate;
public const DateFormat vbLongDate = DateFormat.LongDate;
public const DateFormat vbShortDate = DateFormat.ShortDate;
public const DateFormat vbLongTime = DateFormat.LongTime;
public const DateFormat vbShortTime = DateFormat.ShortTime;
public const FirstDayOfWeek vbUseSystemDayOfWeek = FirstDayOfWeek.System;
public const FirstDayOfWeek vbSunday = FirstDayOfWeek.Sunday;
public const FirstDayOfWeek vbMonday = FirstDayOfWeek.Monday;
public const FirstDayOfWeek vbTuesday = FirstDayOfWeek.Tuesday;
public const FirstDayOfWeek vbWednesday = FirstDayOfWeek.Wednesday;
public const FirstDayOfWeek vbThursday = FirstDayOfWeek.Thursday;
public const FirstDayOfWeek vbFriday = FirstDayOfWeek.Friday;
public const FirstDayOfWeek vbSaturday = FirstDayOfWeek.Saturday;
public const FileAttribute vbNormal = FileAttribute.Normal;
public const FileAttribute vbReadOnly = FileAttribute.ReadOnly;
public const FileAttribute vbHidden = FileAttribute.Hidden;
public const FileAttribute vbSystem = FileAttribute.System;
public const FileAttribute vbVolume = FileAttribute.Volume;
public const FileAttribute vbDirectory = FileAttribute.Directory;
public const FileAttribute vbArchive = FileAttribute.Archive;
public const FirstWeekOfYear vbUseSystem = FirstWeekOfYear.System;
public const FirstWeekOfYear vbFirstJan1 = FirstWeekOfYear.Jan1;
public const FirstWeekOfYear vbFirstFourDays = FirstWeekOfYear.FirstFourDays;
public const FirstWeekOfYear vbFirstFullWeek = FirstWeekOfYear.FirstFullWeek;
public const VbStrConv vbUpperCase = VbStrConv.UpperCase;
public const VbStrConv vbLowerCase = VbStrConv.LowerCase;
public const VbStrConv vbProperCase = VbStrConv.ProperCase;
public const VbStrConv vbWide = VbStrConv.Wide;
public const VbStrConv vbNarrow = VbStrConv.Narrow;
public const VbStrConv vbKatakana = VbStrConv.Katakana;
public const VbStrConv vbHiragana = VbStrConv.Hiragana;
public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese;
public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese;
public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing;
public const TriState vbUseDefault = TriState.UseDefault;
public const TriState vbTrue = TriState.True;
public const TriState vbFalse = TriState.False;
public const VariantType vbEmpty = VariantType.Empty;
public const VariantType vbNull = VariantType.Null;
public const VariantType vbInteger = VariantType.Integer;
public const VariantType vbLong = VariantType.Long;
public const VariantType vbSingle = VariantType.Single;
public const VariantType vbDouble = VariantType.Double;
public const VariantType vbCurrency = VariantType.Currency;
public const VariantType vbDate = VariantType.Date;
public const VariantType vbString = VariantType.String;
public const VariantType vbObject = VariantType.Object;
public const VariantType vbBoolean = VariantType.Boolean;
public const VariantType vbVariant = VariantType.Variant;
public const VariantType vbDecimal = VariantType.Decimal;
public const VariantType vbByte = VariantType.Byte;
public const VariantType vbUserDefinedType = VariantType.UserDefinedType;
public const VariantType vbArray = VariantType.Array;
public const MsgBoxResult vbOK = MsgBoxResult.OK;
public const MsgBoxResult vbCancel = MsgBoxResult.Cancel;
public const MsgBoxResult vbAbort = MsgBoxResult.Abort;
public const MsgBoxResult vbRetry = MsgBoxResult.Retry;
public const MsgBoxResult vbIgnore = MsgBoxResult.Ignore;
public const MsgBoxResult vbYes = MsgBoxResult.Yes;
public const MsgBoxResult vbNo = MsgBoxResult.No;
public const MsgBoxStyle vbOKOnly = MsgBoxStyle.OKOnly;
public const MsgBoxStyle vbOKCancel = MsgBoxStyle.OKCancel;
public const MsgBoxStyle vbAbortRetryIgnore = MsgBoxStyle.AbortRetryIgnore;
public const MsgBoxStyle vbYesNoCancel = MsgBoxStyle.YesNoCancel;
public const MsgBoxStyle vbYesNo = MsgBoxStyle.YesNo;
public const MsgBoxStyle vbRetryCancel = MsgBoxStyle.RetryCancel;
public const MsgBoxStyle vbCritical = MsgBoxStyle.Critical;
public const MsgBoxStyle vbQuestion = MsgBoxStyle.Question;
public const MsgBoxStyle vbExclamation = MsgBoxStyle.Exclamation;
public const MsgBoxStyle vbInformation = MsgBoxStyle.Information;
public const MsgBoxStyle vbDefaultButton1 = MsgBoxStyle.DefaultButton1;
public const MsgBoxStyle vbDefaultButton2 = MsgBoxStyle.DefaultButton2;
public const MsgBoxStyle vbDefaultButton3 = MsgBoxStyle.DefaultButton3;
public const MsgBoxStyle vbApplicationModal = MsgBoxStyle.ApplicationModal;
public const MsgBoxStyle vbSystemModal = MsgBoxStyle.SystemModal;
public const MsgBoxStyle vbMsgBoxHelp = MsgBoxStyle.MsgBoxHelp;
public const MsgBoxStyle vbMsgBoxRight = MsgBoxStyle.MsgBoxRight;
public const MsgBoxStyle vbMsgBoxRtlReading = MsgBoxStyle.MsgBoxRtlReading;
public const MsgBoxStyle vbMsgBoxSetForeground = MsgBoxStyle.MsgBoxSetForeground;
// Constructors
// Properties
// Methods
// Events
};
}
using System;
namespace Microsoft.VisualBasic {
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Constants {
// Declarations
public const System.Int32 vbObjectError = (System.Int32)(-2147221504);
public const System.String vbCrLf = "\n\r";
public const System.String vbNewLine = "\n\r";
public const System.String vbCr = "\n";
public const System.String vbLf = "\r";
public const System.String vbBack = "\b";
public const System.String vbFormFeed = "\f";
public const System.String vbTab = "\t";
public const System.String vbVerticalTab = "\v";
public const System.String vbNullChar = "\0";
public const System.String vbNullString = "";
public const AppWinStyle vbHide = AppWinStyle.Hide;
public const AppWinStyle vbNormalFocus = AppWinStyle.NormalFocus;
public const AppWinStyle vbMinimizedFocus = AppWinStyle.MinimizedFocus;
public const AppWinStyle vbMaximizedFocus = AppWinStyle.MaximizedFocus;
public const AppWinStyle vbNormalNoFocus = AppWinStyle.NormalNoFocus;
public const AppWinStyle vbMinimizedNoFocus = AppWinStyle.MinimizedNoFocus;
public const CallType vbMethod = CallType.Method;
public const CallType vbGet = CallType.Get;
public const CallType vbLet = CallType.Let;
public const CallType vbSet = CallType.Set;
public const CompareMethod vbBinaryCompare = CompareMethod.Binary;
public const CompareMethod vbTextCompare = CompareMethod.Text;
public const DateFormat vbGeneralDate = DateFormat.GeneralDate;
public const DateFormat vbLongDate = DateFormat.LongDate;
public const DateFormat vbShortDate = DateFormat.ShortDate;
public const DateFormat vbLongTime = DateFormat.LongTime;
public const DateFormat vbShortTime = DateFormat.ShortTime;
public const FirstDayOfWeek vbUseSystemDayOfWeek = FirstDayOfWeek.System;
public const FirstDayOfWeek vbSunday = FirstDayOfWeek.Sunday;
public const FirstDayOfWeek vbMonday = FirstDayOfWeek.Monday;
public const FirstDayOfWeek vbTuesday = FirstDayOfWeek.Tuesday;
public const FirstDayOfWeek vbWednesday = FirstDayOfWeek.Wednesday;
public const FirstDayOfWeek vbThursday = FirstDayOfWeek.Thursday;
public const FirstDayOfWeek vbFriday = FirstDayOfWeek.Friday;
public const FirstDayOfWeek vbSaturday = FirstDayOfWeek.Saturday;
public const FileAttribute vbNormal = FileAttribute.Normal;
public const FileAttribute vbReadOnly = FileAttribute.ReadOnly;
public const FileAttribute vbHidden = FileAttribute.Hidden;
public const FileAttribute vbSystem = FileAttribute.System;
public const FileAttribute vbVolume = FileAttribute.Volume;
public const FileAttribute vbDirectory = FileAttribute.Directory;
public const FileAttribute vbArchive = FileAttribute.Archive;
public const FirstWeekOfYear vbUseSystem = FirstWeekOfYear.System;
public const FirstWeekOfYear vbFirstJan1 = FirstWeekOfYear.Jan1;
public const FirstWeekOfYear vbFirstFourDays = FirstWeekOfYear.FirstFourDays;
public const FirstWeekOfYear vbFirstFullWeek = FirstWeekOfYear.FirstFullWeek;
public const VbStrConv vbUpperCase = VbStrConv.UpperCase;
public const VbStrConv vbLowerCase = VbStrConv.LowerCase;
public const VbStrConv vbProperCase = VbStrConv.ProperCase;
public const VbStrConv vbWide = VbStrConv.Wide;
public const VbStrConv vbNarrow = VbStrConv.Narrow;
public const VbStrConv vbKatakana = VbStrConv.Katakana;
public const VbStrConv vbHiragana = VbStrConv.Hiragana;
public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese;
public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese;
public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing;
public const TriState vbUseDefault = TriState.UseDefault;
public const TriState vbTrue = TriState.True;
public const TriState vbFalse = TriState.False;
public const VariantType vbEmpty = VariantType.Empty;
public const VariantType vbNull = VariantType.Null;
public const VariantType vbInteger = VariantType.Integer;
public const VariantType vbLong = VariantType.Long;
public const VariantType vbSingle = VariantType.Single;
public const VariantType vbDouble = VariantType.Double;
public const VariantType vbCurrency = VariantType.Currency;
public const VariantType vbDate = VariantType.Date;
public const VariantType vbString = VariantType.String;
public const VariantType vbObject = VariantType.Object;
public const VariantType vbBoolean = VariantType.Boolean;
public const VariantType vbVariant = VariantType.Variant;
public const VariantType vbDecimal = VariantType.Decimal;
public const VariantType vbByte = VariantType.Byte;
public const VariantType vbUserDefinedType = VariantType.UserDefinedType;
public const VariantType vbArray = VariantType.Array;
public const MsgBoxResult vbOK = MsgBoxResult.OK;
public const MsgBoxResult vbCancel = MsgBoxResult.Cancel;
public const MsgBoxResult vbAbort = MsgBoxResult.Abort;
public const MsgBoxResult vbRetry = MsgBoxResult.Retry;
public const MsgBoxResult vbIgnore = MsgBoxResult.Ignore;
public const MsgBoxResult vbYes = MsgBoxResult.Yes;
public const MsgBoxResult vbNo = MsgBoxResult.No;
public const MsgBoxStyle vbOKOnly = MsgBoxStyle.OKOnly;
public const MsgBoxStyle vbOKCancel = MsgBoxStyle.OKCancel;
public const MsgBoxStyle vbAbortRetryIgnore = MsgBoxStyle.AbortRetryIgnore;
public const MsgBoxStyle vbYesNoCancel = MsgBoxStyle.YesNoCancel;
public const MsgBoxStyle vbYesNo = MsgBoxStyle.YesNo;
public const MsgBoxStyle vbRetryCancel = MsgBoxStyle.RetryCancel;
public const MsgBoxStyle vbCritical = MsgBoxStyle.Critical;
public const MsgBoxStyle vbQuestion = MsgBoxStyle.Question;
public const MsgBoxStyle vbExclamation = MsgBoxStyle.Exclamation;
public const MsgBoxStyle vbInformation = MsgBoxStyle.Information;
public const MsgBoxStyle vbDefaultButton1 = MsgBoxStyle.DefaultButton1;
public const MsgBoxStyle vbDefaultButton2 = MsgBoxStyle.DefaultButton2;
public const MsgBoxStyle vbDefaultButton3 = MsgBoxStyle.DefaultButton3;
public const MsgBoxStyle vbApplicationModal = MsgBoxStyle.ApplicationModal;
public const MsgBoxStyle vbSystemModal = MsgBoxStyle.SystemModal;
public const MsgBoxStyle vbMsgBoxHelp = MsgBoxStyle.MsgBoxHelp;
public const MsgBoxStyle vbMsgBoxRight = MsgBoxStyle.MsgBoxRight;
public const MsgBoxStyle vbMsgBoxRtlReading = MsgBoxStyle.MsgBoxRtlReading;
public const MsgBoxStyle vbMsgBoxSetForeground = MsgBoxStyle.MsgBoxSetForeground;
// Constructors
// Properties
// Methods
// Events
};
}
@@ -1,3 +1,7 @@
2004-06-30 Umadevi S <[email protected]>
* Tds.cs - In the NextResult method handling TdsPacketSubType. TableName.
2004-04-22 Sebastien Pouliot <[email protected]>
* Tds70.cs: Updated to match changes in Mono.Security.dll.
@@ -293,6 +293,12 @@ namespace Mono.Data.Tds.Protocol {
break;
case TdsPacketSubType.TableName:
// done = true;
peek = Comm.Peek ();
done = (peek != (byte) TdsPacketSubType.ColumnDetail);
break;
case TdsPacketSubType.ColumnDetail:
done = true;
break;
default:
+1 -2
View File
@@ -4,5 +4,4 @@
./Mono.Posix/Syscall.cs
./Mono.Posix/MapAttribute.cs
./Mono.Posix/IncludeAttribute.cs
./Mono.Posix/Catalog.cs
./Mono.Posix/PeerCred.cs
./Mono.Posix/Catalog.cs
@@ -1,7 +1,3 @@
2004-07-09 Dick Porter <[email protected]>
* PeerCred.cs: Get the unix socket peer credentials.
2004-05-26 Miguel de Icaza <[email protected]>
* Syscall.cs: Do not let the runtime handle strings, as we do not
@@ -1,78 +0,0 @@
//
// Mono.Posix.PeerCred: Peer credentials class for AF_UNIX sockets
//
// Authors:
// Dick Porter ([email protected])
//
// (C) 2004 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Net.Sockets;
namespace Mono.Posix
{
public class PeerCred
{
private struct PeerCredData {
public int pid;
public int uid;
public int gid;
}
/* Make sure this doesn't clash with anything in
* SocketOptionName, and keep it synchronised with the
* runtime
*/
private const int so_peercred=10001;
private PeerCredData data;
public PeerCred (Socket sock) {
if (sock.AddressFamily != AddressFamily.Unix) {
throw new ArgumentException ("Only Unix sockets are supported", "sock");
}
data = (PeerCredData)sock.GetSocketOption (SocketOptionLevel.Socket, (SocketOptionName)so_peercred);
}
public int ProcessID {
get {
return(data.pid);
}
}
public int UserID {
get {
return(data.uid);
}
}
public int GroupID {
get {
return(data.gid);
}
}
}
}
@@ -1,15 +1,3 @@
2004-07-14 Sebastien Pouliot <[email protected]>
* SslClientStream.cs: Changed lock to "new object()" and not
String.Empty (as the read/write locks points becomes the same).
* SslServerStream.cs: Changed lock to "new object()" and not
String.Empty (as the read/write locks points becomes the same).
2004-07-14 Gonzalo Paniagua Javier <[email protected]>
* HttpsClientStream.cs: get an HttpWebRequest so that we can use the
ServicePoint it has. No need to get the host now.
2004-05-09 Carlos Guzman Alvarez <[email protected]>
* Mono.Security.Protocol.Tls/Alert.cs:
@@ -40,13 +40,14 @@ namespace Mono.Security.Protocol.Tls {
internal class HttpsClientStream : SslClientStream {
private HttpWebRequest _request;
private string _host;
private WebRequest _request;
public HttpsClientStream (Stream stream, X509CertificateCollection clientCertificates,
HttpWebRequest request)
: base (stream, request.RequestUri.Host, false, SecurityProtocolType.Default, clientCertificates)
public HttpsClientStream (Stream stream, string targetHost, X509CertificateCollection clientCertificates, WebRequest request)
: base (stream, targetHost, false, SecurityProtocolType.Default, clientCertificates)
{
_host = targetHost;
// this constructor permit access to the WebRequest to call
// ICertificatePolicy.CheckValidationResult
_request = request;
@@ -60,7 +61,8 @@ namespace Mono.Security.Protocol.Tls {
{
bool failed = (certificateErrors.Length > 0);
if (ServicePointManager.CertificatePolicy != null) {
ServicePoint sp = _request.ServicePoint;
Uri target = new Uri ("https://" + _host);
ServicePoint sp = ServicePointManager.FindServicePoint (target);
// only one problem can be reported by this interface
int problem = ((failed) ? certificateErrors [0] : 0);
@@ -349,8 +349,8 @@ namespace Mono.Security.Protocol.Tls
this.inputBuffer = new BufferedStream(new MemoryStream());
this.innerStream = stream;
this.ownsStream = ownsStream;
this.read = new object ();
this.write = new object ();
this.read = String.Empty;
this.write = String.Empty;
this.protocol = new ClientRecordProtocol(innerStream, context);
}
@@ -821,4 +821,4 @@ namespace Mono.Security.Protocol.Tls
#endregion
}
}
}
@@ -306,8 +306,8 @@ namespace Mono.Security.Protocol.Tls
this.inputBuffer = new BufferedStream(new MemoryStream());
this.innerStream = stream;
this.ownsStream = ownsStream;
this.read = new object ();
this.write = new object ();
this.read = String.Empty;
this.write = String.Empty;
this.protocol = new ServerRecordProtocol(innerStream, context);
}
@@ -1,8 +1,3 @@
2004-07-15 Sebastien Pouliot <[email protected]>
* KeyUsageExtension.cs: Added Encode to extension so it can be used
by makecert. Fix bug # 61240. Patch provided by Ianier Munoz.
2004-04-28 Sebastien Pouliot <[email protected]>
* KeyUsageExtension.cs: Added missing INSIDE_CORLIB to enum.
@@ -86,11 +86,6 @@ namespace Mono.Security.X509.Extensions {
public KeyUsageExtension (X509Extension extension) : base (extension) {}
public KeyUsageExtension () : base ()
{
extnOid = "2.5.29.15";
}
protected override void Decode ()
{
ASN1 bitString = new ASN1 (extnValue.Value);
@@ -101,18 +96,6 @@ namespace Mono.Security.X509.Extensions {
kubits = (kubits << 8) + bitString.Value [i++];
}
protected override void Encode ()
{
if (extnValue == null) {
extnValue = new ASN1 (0x03, new byte[] { 0x00, (byte)kubits });
}
}
public KeyUsages KeyUsage {
get { return (KeyUsages) kubits; }
set { kubits = Convert.ToInt32 (value, CultureInfo.InvariantCulture); }
}
public override string Name {
get { return "Key Usage"; }
}
@@ -1,9 +1,3 @@
2004-07-15 Sebastien Pouliot <[email protected]>
* X501Name.cs: Support for E (email) in FromString.
* X520Attributes.cs: Added X520.EmailAddress.
Both patches fix bug #61241 and were contributed by Ianier Munoz.
2004-05-27 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Rethrow original exception when parsing X.509
@@ -162,8 +162,6 @@ namespace Mono.Security.X509 {
case "S": // Microsoft
case "ST": // RFC2253
return new X520.StateOrProvinceName ();
case "E": // NOTE: Not part of RFC2253
return new X520.EmailAddress ();
case "DC":
// return streetAddress;
case "UID":
@@ -101,10 +101,6 @@ namespace Mono.Security.X509 {
// PRINTABLESTRING
asn1.Add (new ASN1 (0x13, Encoding.ASCII.GetBytes (attrValue)));
break;
case 0x16:
// IA5STRING
asn1.Add (new ASN1 (0x16, Encoding.ASCII.GetBytes (attrValue)));
break;
case 0x1E:
// BMPSTRING
asn1.Add (new ASN1 (0x1E, Encoding.BigEndianUnicode.GetBytes (attrValue)));
@@ -180,14 +176,6 @@ namespace Mono.Security.X509 {
}
}
// NOTE: Not part of RFC2253
public class EmailAddress : AttributeTypeAndValue
{
public EmailAddress () : base ("1.2.840.113549.1.9.1", 128, 0x16)
{
}
}
/* -- Naming attributes of type X520Title
* id-at-title AttributeType ::= { id-at 12 }
*
@@ -1,6 +1,3 @@
2004-07-12 Umadevi S <[email protected]>
* Tokenizer.cs - read an Int64 from the text instead of Int32. Resolves bug 61203
2004-06-17 Boris Kirzner <[email protected]>
* Comparison.cs - use 'as' to avoid NullReferenceExeption in casting.
@@ -122,7 +122,7 @@ namespace Mono.Data.SqlExpressions {
string str = sb.ToString ();
if (str.IndexOf(".") == -1)
return Int64.Parse (str);
return int.Parse (str);
else
return double.Parse (str);
}
@@ -1,11 +1,5 @@
2004-07-21 Umadevi S <[email protected]>
* DbDataRecord.cs - Fix for bug 58163. Return DBNull instead of null
2004-07-07 Umadevi S <[email protected]>
* DataContainer.cs :CheckedforNull before calling the relavant setmethods in each of the
SetItemForDataRecord method for the DateTimeClass
2004-06-24 Atsushi Enomoto <[email protected]>
* DataColumnMappingCollection.cs : fixed typo.
* DbDataAdapter.cs : column mappings were not filled.
@@ -1098,8 +1098,8 @@ namespace System.Data.Common
{
// if exception thrown, it should be caught
// in the caller method
if (!CheckAndSetNull(index,record,field))
base.SetValue(index,record.GetDateTime(field));
base.SetValue(index,record.GetDateTime(field));
base.SetItemFromDataRecord(index,record,field);
}
internal override int CompareValues(int index1, int index2)
@@ -340,7 +340,7 @@ namespace System.Data.Common {
public bool IsDBNull (int i)
{
return GetValue (i) == DBNull.Value;
return GetValue (i) == null;
}
#if NET_2_0
public virtual bool IsSetAsDefault (int i)
@@ -1,24 +1,3 @@
2004-07-30 Sureshkumar T ([email protected])
* OdbcCommand.cs: ExecuteNonQuery Closed statement handle to fix memory leak
* OdbcDataReader.cs: Closed statement handle to fix memory leak
Removed SQLState login in GetBytes coz OdbcError provides the same.
2004-07-29 Umadevi S ([email protected])
* OdbcCommand.cs - Fixed bug 62046. ExecuteNonQuery implemented correctly
2004-07-28 Umadevi S ([email protected])
* OdbcParameter.cs - fixed bug 61968. String values passed with quotes
2004-07-07 Umadevi S ([email protected])
* OdbcConnection.cs - Allowed Close to be called multiple times
- Implementation of Dispose method
2004-07-07 Umadevi S ([email protected])
* OdbcCommand.cs : fixed set method for Transaction
2004-07-01 Sureshkumar T ([email protected])
* OdbcCommand.cs : fixed reader problem with ExecuteScalar
2004-06-23 Sureshkumar T ([email protected])
* OdbcConnection.cs: Fix: Moved env allocation to Open method.
Disconnection & freeing handles are done in Close
@@ -223,14 +223,7 @@ namespace System.Data.Odbc
return (IDbTransaction) Transaction;
}
set {
if (value is OdbcTransaction)
{
Transaction = (OdbcTransaction)value;
}
else
{
throw new ArgumentException ();
}
throw new NotImplementedException ();
}
}
@@ -292,12 +285,6 @@ namespace System.Data.Odbc
public int ExecuteNonQuery ()
{
return ExecuteNonQuery (true);
}
private int ExecuteNonQuery (bool freeHandle)
{
int records = 0;
if (connection == null)
throw new InvalidOperationException ();
if (connection.State == ConnectionState.Closed)
@@ -305,29 +292,12 @@ namespace System.Data.Odbc
// FIXME: a third check is mentioned in .NET docs
ExecSQL(CommandText);
// .NET documentation says that except for INSERT, UPDATE and
// DELETE where the return value is the number of rows affected
// for the rest of the commands the return value is -1.
if ((CommandText.ToUpper().IndexOf("UPDATE")!=-1) ||
(CommandText.ToUpper().IndexOf("INSERT")!=-1) ||
(CommandText.ToUpper().IndexOf("DELETE")!=-1)) {
int numrows = 0;
OdbcReturn ret = libodbc.SQLRowCount(hstmt,ref numrows);
records = numrows;
}
else
records = -1;
if (freeHandle && !prepared) {
OdbcReturn ret = libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
throw new OdbcException(new OdbcError("SQLFreeHandle",OdbcHandleType.Stmt,hstmt));
}
return records;
}
// if (!prepared)
// libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
return 0;
}
public void Prepare()
{
OdbcReturn ret=libodbc.SQLAllocHandle(OdbcHandleType.Stmt, Connection.hDbc, ref hstmt);
@@ -360,7 +330,7 @@ namespace System.Data.Odbc
public OdbcDataReader ExecuteReader (CommandBehavior behavior)
{
ExecuteNonQuery(false);
ExecuteNonQuery();
dataReader=new OdbcDataReader(this,behavior);
return dataReader;
}
@@ -372,12 +342,11 @@ namespace System.Data.Odbc
public object ExecuteScalar ()
{
object val = null;
object val;
OdbcDataReader reader=ExecuteReader();
try
{
if (reader.Read ())
val=reader[0];
val=reader[0];
}
finally
{
@@ -46,7 +46,6 @@ namespace System.Data.Odbc
int connectionTimeout;
internal OdbcTransaction transaction;
IntPtr henv=IntPtr.Zero, hdbc=IntPtr.Zero;
bool disposed = false;
#endregion
@@ -217,6 +216,8 @@ namespace System.Data.Odbc
transaction = null;
}
else
throw new InvalidOperationException ();
}
public OdbcCommand CreateCommand ()
@@ -230,23 +231,10 @@ namespace System.Data.Odbc
throw new NotImplementedException ();
}
[MonoTODO]
protected override void Dispose (bool disposing)
{
if (!this.disposed) {
try
{
// release the native unmananged resources
this.Close();
this.disposed = true;
}
finally
{
// call Dispose on the base class
base.Dispose(disposing);
}
}
}
{
}
[MonoTODO]
object ICloneable.Clone ()
@@ -167,8 +167,25 @@ namespace System.Data.Odbc
return cols[ordinal];
}
private string GetSQLState (IntPtr hstmt, ushort recNo)
{
OdbcReturn ret = OdbcReturn.Error;
short bufLength=256, txtLength=0;
int nativeError = 1;
string sqlState = "", sqlMsg = "";
byte [] msgtxtBuffer = new byte [bufLength];
byte [] sqlStateBuffer = new byte [bufLength];
ret = libodbc.SQLGetDiagRec (OdbcHandleType.Stmt, hstmt, recNo,
sqlStateBuffer, ref nativeError, msgtxtBuffer,
bufLength, ref txtLength);
sqlState = Encoding.Default.GetString (sqlStateBuffer).Replace (
(char) 0, ' ').Trim ();
return sqlState;
}
public void Close ()
{
// libodbc.SQLFreeHandle((ushort) OdbcHandleType.Stmt, hstmt);
OdbcReturn ret=libodbc.SQLCloseCursor(hstmt);
if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
@@ -179,9 +196,6 @@ namespace System.Data.Odbc
if ((behavior & CommandBehavior.CloseConnection)==CommandBehavior.CloseConnection)
this.command.Connection.Close();
ret = libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
throw new OdbcException(new OdbcError("SQLFreeHandle",OdbcHandleType.Stmt,hstmt));
}
~OdbcDataReader ()
@@ -217,10 +231,6 @@ namespace System.Data.Odbc
if ( (ret != OdbcReturn.Success) && (ret != OdbcReturn.SuccessWithInfo))
throw new OdbcException (new OdbcError ("SQLGetData", OdbcHandleType.Stmt, hstmt));
OdbcError odbcErr = null;
if ( (ret == OdbcReturn.SuccessWithInfo))
odbcErr = new OdbcError ("SQLGetData", OdbcHandleType.Stmt, hstmt);
if (buffer == null)
return outsize; //if buffer is null,return length of the field
@@ -231,10 +241,11 @@ namespace System.Data.Odbc
copyBuffer = false;
returnVal = -1;
} else {
string sqlstate = odbcErr.SQLState;
string sqlstate = GetSQLState (hstmt, 1);
//SQLState: String Data, Right truncated
if (sqlstate != libodbc.SQLSTATE_RIGHT_TRUNC)
throw new OdbcException ( odbcErr);
throw new OdbcException (new OdbcError ("SQLGetData",
OdbcHandleType.Stmt, hstmt));
copyBuffer = true;
}
} else {
@@ -389,6 +400,7 @@ namespace System.Data.Odbc
for (int i = 0; i < cols.Length; i += 1 )
{
OdbcColumn col=GetColumn(i);
//Console.WriteLine("{0}:{1}:{2}",col.ColumnName,col.DataType,col.OdbcType);
schemaRow = dataTableSchema.NewRow ();
dataTableSchema.Rows.Add (schemaRow);
@@ -527,6 +539,7 @@ namespace System.Data.Odbc
DataValue = buffer;
break;
default:
//Console.WriteLine("Fetching unsupported data type as string: "+col.OdbcType.ToString());
bufsize=255;
buffer=new byte[bufsize];
ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Char, buffer, bufsize, ref outsize);
@@ -261,9 +261,6 @@ namespace System.Data.Odbc
string paramValueString = ParamValue.ToString();
// Treat everything else as a string
// Init string buffer
if (ParamValue is String)
paramValueString = "\'"+paramValueString+"\'";
if (buffer == null || buffer.Length < ((size > 20) ? size : 20))
buffer = new byte[(size > 20) ? size : 20];
else
@@ -1,3 +1,7 @@
2004-06-30 Umadevi S <[email protected]>
* SqlCommand.cs : In the Execute Method the commandbehavior parameters were ignored correct
these
2004-06-22 Atsushi Enomoto <[email protected]>
* SqlCommandBuilder.cs : Avoid cast exception caused by DbNull.
@@ -268,8 +268,8 @@ namespace System.Data.SqlClient {
{
TdsMetaParameterCollection parms = Parameters.MetaParameters;
if (preparedStatement == null) {
bool schemaOnly = ((CommandBehavior & CommandBehavior.SchemaOnly) > 0);
bool keyInfo = ((CommandBehavior & CommandBehavior.KeyInfo) > 0);
bool schemaOnly = ((behavior & CommandBehavior.SchemaOnly) > 0);
bool keyInfo = ((behavior & CommandBehavior.KeyInfo) > 0);
StringBuilder sql1 = new StringBuilder ();
StringBuilder sql2 = new StringBuilder ();
@@ -1,8 +1,3 @@
2004-07-27 Atsushi Enomoto <[email protected]>
* DataSet.cs : on serialization to XmlWriter, XmlConvert should be
used. There were also some culture dependency problems to write int.
2004-06-27 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : It was not always filling relation
+5 -5
View File
@@ -1270,7 +1270,7 @@ namespace System.Data {
private void WriteColumnAsAttribute (XmlWriter writer, XmlWriteMode mode, DataColumn col, DataRow row, DataRowVersion version)
{
WriteAttributeString (writer, mode, col.Namespace, col.Prefix, XmlConvert.EncodeLocalName (col.ColumnName), WriteObjectXml (row[col, version]));
WriteAttributeString (writer, mode, col.Namespace, col.Prefix, XmlConvert.EncodeLocalName (col.ColumnName), row[col, version].ToString ());
}
private void WriteTableElement (XmlWriter writer, XmlWriteMode mode, DataTable table, DataRow row, DataRowVersion version)
@@ -1282,7 +1282,7 @@ namespace System.Data {
if (mode == XmlWriteMode.DiffGram) {
WriteAttributeString (writer, mode, XmlConstants.DiffgrNamespace, XmlConstants.DiffgrPrefix, "id", table.TableName + (row.XmlRowID + 1));
WriteAttributeString (writer, mode, XmlConstants.MsdataNamespace, XmlConstants.MsdataPrefix, "rowOrder", XmlConvert.ToString (row.XmlRowID));
WriteAttributeString (writer, mode, XmlConstants.MsdataNamespace, XmlConstants.MsdataPrefix, "rowOrder", row.XmlRowID.ToString());
string modeName = null;
if (row.RowState == DataRowState.Modified)
modeName = "modified";
@@ -1618,7 +1618,7 @@ namespace System.Data {
// add ordinal attribute
xlmAttrs[1] = doc.CreateAttribute (XmlConstants.MsdataPrefix, XmlConstants.Ordinal, XmlConstants.MsdataNamespace);
xlmAttrs[1].Value = XmlConvert.ToString (simple.Ordinal);
xlmAttrs[1].Value = simple.Ordinal.ToString();
simpleContent.UnhandledAttributes = xlmAttrs;
@@ -1655,12 +1655,12 @@ namespace System.Data {
if (col.AutoIncrementSeed != 0) {
xattr = doc.CreateAttribute (XmlConstants.MsdataPrefix, XmlConstants.AutoIncrementSeed, XmlConstants.MsdataNamespace);
xattr.Value = XmlConvert.ToString (col.AutoIncrementSeed);
xattr.Value = col.AutoIncrementSeed.ToString();
xattrs.Add (xattr);
}
if (col.DefaultValue.ToString () != String.Empty)
colElem.DefaultValue = WriteObjectXml (col.DefaultValue);
colElem.DefaultValue = col.DefaultValue.ToString ();
if (col.MaxLength < 0)
colElem.SchemaTypeName = MapType (col.DataType);
@@ -1,14 +1,3 @@
2004-07-29 Umadevi S <[email protected]>
* OdbcCommandTest.cs - Added testcase for bug 62046. ExecuteNonQuery
2004-07-28 Umadevi S <[email protected]>
* OdbcCommandTest.cs - Added testcase for bug 61968. String values passed with quotes
2004-07-01 Sureshkumar T <[email protected]>
* Added test case for OdbcCommand.ExecuteScalar Method
* New files:
OdbcCommandTest.cs - test suite for OdbcCommand class.
2004-06-23 Sureshkumar T <[email protected]>
* Added test to check whether the OdbcConnection.Close method closes
all the handles.
@@ -1,113 +0,0 @@
//
// OdbcCommandTest.cs - NUnit Test Cases for testing the
// OdbcCommand class
//
// Authors:
// Sureshkumar T ([email protected])
// Umadevi S ([email protected])
//
// Copyright (c) 2004 Novell Inc., and the individuals listed
// on the ChangeLog entries.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Data.Odbc;
using NUnit.Framework;
namespace MonoTests.System.Data.Odbc
{
[TestFixture]
public class OdbcCommandTest : MySqlOdbcBaseClient
{
[SetUp]
public void GetReady () {
OpenConnection ();
CreateTestSetup (); // create database & test tables
}
[TearDown]
public void Clean () {
CleanTestSetup (); // clean test database;
CloseConnection ();
}
/// <summary>
/// Test Execute Scalar Method
/// </summary>
[Test]
public void ExecuteScalarTest ()
{
OdbcCommand cmd = conn.CreateCommand ();
string query = "select count(*) from test order by col_int;";
cmd.CommandText = query;
object objCount = cmd.ExecuteScalar ();
Assertion.AssertEquals( "ExecuteScalar does not return int type", 5, Convert.ToInt32(objCount));
}
/// <summary>
/// Test String parameters to ODBC Command
/// </summary>
[Test]
public void ExecuteStringParameterTest()
{
OdbcCommand dbcmd = new OdbcCommand();
dbcmd.Connection = conn;
dbcmd.CommandType = CommandType.Text;
dbcmd.CommandText = "select count(*) from test where col_char=?;";
string colvalue = "mono test#1";
dbcmd.Parameters.Add("@un",colvalue);
Object obj = dbcmd.ExecuteScalar();
Assertion.AssertEquals( "String parameter not passed correctly",1,Convert.ToInt32(obj));
}
/// <summary>
/// Test ExecuteNonQuery
/// </summary>
[Test]
public void ExecuteNonQueryTest ()
{
OdbcCommand dbcmd = new OdbcCommand();
dbcmd.Connection = conn;
dbcmd.CommandType = CommandType.Text;
dbcmd.CommandText = "select count(*) from test where col_char=?;";
string colvalue = "mono test";
dbcmd.Parameters.Add("@un",colvalue);
int ret = dbcmd.ExecuteNonQuery();
Assertion.AssertEquals( "ExecuteNonQuery not working",-1, ret);
dbcmd = new OdbcCommand();
dbcmd.Connection = conn;
dbcmd.CommandType = CommandType.Text;
dbcmd.CommandText = "delete from test where (col_int >257);";
ret = dbcmd.ExecuteNonQuery();
Assertion.AssertEquals("ExecuteNonQuery not working", 2, ret);}
}
}
@@ -1,7 +1,3 @@
2004-07-02 Jordi Mas i Hernandez <[email protected]>
* gdipFunctions.cs: fixes bug 61050
2004-06-24 Sanjay Gupta <[email protected]>
* ImageAnimator.cs: Rewrote complete implementation.
@@ -1418,11 +1418,7 @@ namespace System.Drawing
{
public Stream stream;
public GdiPlusStreamHelper (Stream s)
{
stream = s;
stream.Seek(0, SeekOrigin.Begin);
}
public GdiPlusStreamHelper (Stream s) { stream = s; }
public int StreamGetBytesImpl (IntPtr buf, int bufsz, bool peek)
{
@@ -1,8 +1,3 @@
2004-07-15 Lluis Sanchez Gual <[email protected]>
* TcpServerChannel.cs: Set channel name from the provided properties.
This fixes bug #61592.
2004-05-13 Lluis Sanchez Gual <[email protected]>
* TcpChannel.cs: Made Init private.
@@ -106,9 +106,6 @@ namespace System.Runtime.Remoting.Channels.Tcp
{
switch((string)property.Key)
{
case "name":
name = property.Value.ToString();
break;
case "port":
port = Convert.ToInt32(property.Value);
break;
@@ -1,14 +1,3 @@
2004-07-26 Lluis Sanchez Gual <[email protected]>
* SoapMessageFormater.cs: In BuildSoapMessageFromMethodResponse, add the
return value to the SoapMessage even if it is null. This fixes bug #61837.
2004-07-06 Lluis Sanchez Gual <[email protected]>
* SoapMessageFormatter.cs: In BuildMethodCallFromSoapMessage, set get the
parameters from the SoapMessage by position, not by name, since names
may be different. This fixes bug #60427.
2004-06-16 Lluis Sanchez Gual <[email protected]>
* SoapServerFormatterSink.cs: Removed unneded method.
@@ -222,21 +222,21 @@ namespace System.Runtime.Remoting.Channels {
// have to add them here
_methodCallParameters = _methodCallInfo.GetParameters();
object[] args = new object[_methodCallParameters.Length];
int sn = 0;
for (int n=0; n<_methodCallParameters.Length; n++)
foreach(ParameterInfo paramInfo in _methodCallParameters)
{
ParameterInfo paramInfo = _methodCallParameters [n];
Type paramType = (paramInfo.ParameterType.IsByRef ? paramInfo.ParameterType.GetElementType() : paramInfo.ParameterType);
if (paramInfo.IsOut && paramInfo.ParameterType.IsByRef) {
args [n] = GetNullValue (paramType);
args [paramInfo.Position] = GetNullValue (paramType);
}
else{
object val = soapMessage.ParamValues[sn++];
if(val is IConvertible)
args [n] = Convert.ChangeType (val, paramType);
else
args [n] = val;
int index = Array.IndexOf(soapMessage.ParamNames, paramInfo.Name);
if(soapMessage.ParamValues[index] is IConvertible)
soapMessage.ParamValues[index] = Convert.ChangeType(
soapMessage.ParamValues[index],
paramType);
args [paramInfo.Position] = soapMessage.ParamValues[index];
}
}
@@ -267,16 +267,10 @@ namespace System.Runtime.Remoting.Channels {
ArrayList paramValues = new ArrayList();
ArrayList paramTypes = new ArrayList();
soapMessage.MethodName = mrm.MethodName+"Response";
Type retType = ((MethodInfo)mrm.MethodBase).ReturnType;
if(retType != typeof(void)) {
if(mrm.ReturnValue != null && mrm.ReturnValue.GetType() != typeof(void)) {
paramNames.Add("return");
paramValues.Add(mrm.ReturnValue);
if (mrm.ReturnValue != null)
paramTypes.Add(mrm.ReturnValue.GetType());
else
paramTypes.Add(retType);
paramTypes.Add(mrm.ReturnValue.GetType());
}
for(int i = 0; i < mrm.OutArgCount; i++){
@@ -1,8 +1,3 @@
2004-07-20 Atsushi Enomoto <[email protected]>
* Signature.cs : Fixed NextElementPos() that incorrectly examined
node matching.
2004-06-17 Sebastien Pouliot <[email protected]>
* KeyInfoX509Data.cs: Removed old internal IssuerSerial for the
@@ -192,14 +192,13 @@ namespace System.Security.Cryptography.Xml {
{
while (pos < nl.Count) {
if (nl [pos].NodeType == XmlNodeType.Element) {
if (nl [pos].LocalName != name || nl [pos].NamespaceURI != ns) {
if (nl [pos].LocalName != name && nl [pos].NamespaceURI != ns) {
if (required)
throw new CryptographicException ("Malformed element " + name);
else
return -2;
}
else
return pos;
return pos;
}
else
pos++;
@@ -1,8 +1,3 @@
2004-07-20 Lluis Sanchez Gual <[email protected]>
* HttpWebClientProtocol.cs: Add received cookies to cookieContainer when
getting the response, do not wait for the next request to do it.
2004-06-22 Lluis Sanchez Gual <[email protected]>
* XmlReturnReader.cs, XmlReturnWriter.cs: Generate the serializer with
@@ -45,6 +45,7 @@ namespace System.Web.Services.Protocols {
CookieContainer cookieContainer;
IWebProxy proxy;
string userAgent;
CookieCollection prevCookies;
#if NET_1_1
bool _unsafeAuthenticated;
@@ -116,25 +117,41 @@ namespace System.Web.Services.Protocols {
#region Methods
internal virtual void CheckForCookies (HttpWebResponse response)
internal virtual void AddCookies (Uri uri)
{
CookieCollection cookies = response.Cookies;
if (cookieContainer == null || cookies.Count == 0)
if (cookieContainer == null)
cookieContainer = new CookieContainer ();
if (prevCookies == null || prevCookies.Count == 0)
return;
CookieCollection coll = cookieContainer.GetCookies (uri);
foreach (Cookie c in cookies) {
bool add = true;
foreach (Cookie prev in coll) {
foreach (Cookie prev in prevCookies) {
bool dont = false;
foreach (Cookie c in coll) {
if (c.Equals (prev)) {
add = false;
dont = true;
break;
}
}
if (add)
cookieContainer.Add (c);
if (dont == false)
cookieContainer.Add (prev);
}
}
internal virtual void CheckForCookies (HttpWebResponse response)
{
CookieCollection cookies = response.Cookies;
if (cookies.Count == 0)
return;
if (prevCookies == null)
prevCookies = new CookieCollection ();
foreach (Cookie c in cookies)
prevCookies.Add (c);
}
protected override WebRequest GetWebRequest (Uri uri)
{
@@ -147,6 +164,7 @@ namespace System.Web.Services.Protocols {
if (clientCertificates != null)
request.ClientCertificates.AddRange (clientCertificates);
AddCookies (uri);
request.CookieContainer = cookieContainer;
if (proxy != null)
request.Proxy = proxy;
@@ -319,8 +319,8 @@ namespace System.Web.Compilation
if (isvirtual) {
file = tparser.MapPath (file);
} else {
file = GetIncludeFilePath (tparser.BaseDir, file);
} else if (!Path.IsPathRooted (file)) {
file = UrlUtils.Combine (tparser.BaseVirtualDir, file);
}
InitParser (file);
@@ -332,14 +332,6 @@ namespace System.Web.Compilation
//PrintLocation (location);
}
static string GetIncludeFilePath (string basedir, string filename)
{
if (Path.DirectorySeparatorChar == '/')
filename = filename.Replace ("\\", "/");
return Path.GetFullPath (Path.Combine (basedir, filename));
}
void TextParsed (ILocation location, string text)
{
if (text.IndexOf ("<%") != -1 && !inScript) {
@@ -184,15 +184,12 @@ namespace System.Web.Compilation
str = str.Substring (2).Trim ();
int len = str.Length;
int lastQuote = str.LastIndexOf ('"');
if (len < 10 || lastQuote != len - 1)
return false;
if (!str.ToLower ().StartsWith ("#include "))
if (len < 10 || lastQuote != len - 1 || !str.StartsWith ("#include "))
return false;
str = str.Substring (9).Trim ();
bool isfile = (str.ToLower ().StartsWith ("file"));
if (!isfile && !str.ToLower ().StartsWith ("virtual"))
bool isfile = (str.StartsWith ("file"));
if (!isfile && !str.StartsWith ("virtual"))
return false;
pathType = (isfile) ? "file" : "virtual";
@@ -309,7 +309,7 @@ namespace System.Web.Compilation
bool keepFiles = (Environment.GetEnvironmentVariable ("MONO_ASPNET_NODELETE") != null);
TempFileCollection tempcoll = new TempFileCollection (config.TempDirectory, keepFiles);
compilerParameters.TempFiles = tempcoll;
string dllfilename = Path.GetFileName (tempcoll.AddExtension ("dll", true));
string dllfilename = tempcoll.AddExtension ("dll", true);
if (!Directory.Exists (dynamicBase))
Directory.CreateDirectory (dynamicBase);
@@ -1,18 +1,3 @@
2004-07-21 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: the path for file was treated as virtual, but it's
physical. Fixes bug #61524.
2004-07-16 Gonzalo Paniagua Javier <[email protected]>
* AspParser.cs: fixed case-sensitivity issues with #include and its
attributes. Closes #61429.
2004-07-07 Gonzalo Paniagua Javier <[email protected]>
* BaseCompiler.cs:
* WebServiceCompiler.cs: really create the dlls under DynamicBase
2004-06-19 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: for system colors, use SystemColors class
@@ -93,7 +93,7 @@ namespace System.Web.Compilation
sw.WriteLine (parser.Program);
sw.Close ();
string dllfilename = Path.GetFileName (tempcoll.AddExtension ("dll", true));
string dllfilename = tempcoll.AddExtension ("dll", true);
if (!Directory.Exists (dynamicBase))
Directory.CreateDirectory (dynamicBase);
@@ -1,7 +1,3 @@
2004-07-02 Gonzalo Paniagua Javier <[email protected]>
* TraceHandler.cs: check that trace is enabled or throw.
2004-06-03 Gonzalo Paniagua Javier <[email protected]>
* TraceHandler.cs: Added protected missing members and attributes.
@@ -39,27 +39,16 @@ using System.Web.UI.WebControls;
namespace System.Web.Handlers
{
#if NET_2_0
[Serializable]
#endif
class TraceNotAvailableException : HttpException
{
public TraceNotAvailableException () :
base ("Trace Error") {}
internal override string Description {
get { return "Trace.axd is not enabled in the configuration file for this application."; }
}
}
public class TraceHandler : IHttpHandler
{
void IHttpHandler.ProcessRequest (HttpContext context)
{
TraceManager manager = HttpRuntime.TraceManager;
if (!manager.Enabled || manager.LocalOnly && !context.Request.IsLocal) {
throw new TraceNotAvailableException ();
if (manager.LocalOnly && !context.Request.IsLocal) {
// Need to figure out the error message that goes here
// but I only have cassini for testing
return;
}
HtmlTextWriter output = new HtmlTextWriter (context.Response.Output);
@@ -1,8 +1,3 @@
2004-07-07 Juraj Skripsky <[email protected]>
* SessionStateModule.cs: set path in session cookie to application
path.
2004-06-18 Gert Driesen <[email protected]>
* IStateRuntime.cs: added missing marshalling attributes
@@ -158,7 +158,7 @@ namespace System.Web.SessionState
} else if (isNew) {
string id = context.Session.SessionID;
HttpCookie cookie = new HttpCookie (CookieName, id);
cookie.Path = UrlUtils.GetDirectory (context.Request.ApplicationPath);
cookie.Path = UrlUtils.GetDirectory (context.Request.Path);
context.Response.AppendCookie (cookie);
}
}
@@ -192,9 +192,7 @@ namespace System.Web.UI.WebControls
if(!Visible || (Visible && !Enabled))
{
IsValid = true;
return;
}
Control ctrl = Parent;
while(ctrl != null)
{
@@ -1,9 +1,3 @@
2004-07-29 Gonzalo Paniagua Javier <[email protected]>
* BaseValidator.cs: in Validate(), when the control is not visible or
enabled, return inmediately after setting IsValid to true. Fixes bug
#61831.
2004-06-10 Alon Gazit <[email protected]>
* WebControl.cs: fixed LoadViewState().
Creates new attributes state bag only when the current is null.
@@ -1,19 +1,3 @@
2004-07-16 Gonzalo Paniagua Javier <[email protected]>
* TemplateControl.cs: don't include private methods of base classes when
auto-attaching events. Fixes bug 61569.
2004-07-08 Pablo Baena <[email protected]>
* Page.cs: added workaround for __doPostBack script on Netscape 4.xx
2004-07-02 Gonzalo Paniagua Javier <[email protected]>
* Page.cs: added additional checks for saving/displaying trace data.
* PageParser.cs: removed checks for trace enabled in configuration
files.
2004-06-29 Gonzalo Paniagua Javier <[email protected]>
* ControlCollection.cs: when clearing the control collection, tell the
+3 -15
View File
@@ -526,12 +526,7 @@ public class Page : TemplateControl, IHttpHandler
writer.WriteLine ("<script language=\"javascript\">");
writer.WriteLine ("<!--");
writer.WriteLine ("\tfunction __doPostBack(eventTarget, eventArgument) {");
if (Request.Browser.Browser == ("Netscape") && Request.Browser.MajorVersion == 4)
writer.WriteLine ("\t\tvar theform = document.{0};", formUniqueID);
else
writer.WriteLine ("\t\tvar theform = document.getElementById ('{0}');", formUniqueID);
writer.WriteLine ("\t\tvar theform = document.getElementById ('{0}');", formUniqueID);
writer.WriteLine ("\t\ttheform.{0}.value = eventTarget;", postEventSourceID);
writer.WriteLine ("\t\ttheform.{0}.value = eventArgument;", postEventArgumentID);
writer.WriteLine ("\t\ttheform.submit();");
@@ -774,18 +769,11 @@ public class Page : TemplateControl, IHttpHandler
private void RenderTrace (HtmlTextWriter output)
{
TraceManager traceManager = HttpRuntime.TraceManager;
if (Trace.HaveTrace && !Trace.IsEnabled || !Trace.HaveTrace && !traceManager.Enabled)
if (!Trace.IsEnabled)
return;
Trace.SaveData ();
if (!Trace.HaveTrace && traceManager.Enabled && !traceManager.PageOutput)
return;
if (!traceManager.LocalOnly || Context.Request.IsLocal)
Trace.Render (output);
Trace.Render (output);
}
internal void RaisePostBackEvents ()
@@ -199,6 +199,13 @@ namespace System.Web.UI
}
}
TraceConfig traceConfig = (TraceConfig) Context.GetConfig ("system.web/trace");
if (traceConfig != null) {
trace = traceConfig.Enabled;
if (trace)
haveTrace = true;
}
string tracestr = GetString (atts, "Trace", null);
if (tracestr != null) {
haveTrace = true;
@@ -220,6 +227,13 @@ namespace System.Web.UI
"one of the following values: SortByTime, SortByCategory.");
}
if (traceConfig != null) {
if (traceConfig.LocalOnly && !Context.Request.IsLocal) {
haveTrace = false;
trace = false;
}
}
errorPage = GetString (atts, "ErrorPage", null);
validateRequest = GetBool (atts, "ValidateRequest", PagesConfig.ValidateRequest);
clientTarget = GetString (atts, "ClientTarget", null);
@@ -106,12 +106,6 @@ namespace System.Web.UI {
if (method == null)
continue;
if (method.DeclaringType != type) {
if (!method.IsPublic && !method.IsFamilyOrAssembly &&
!method.IsFamilyAndAssembly && !method.IsFamily)
continue;
}
if (method.ReturnType != typeof (void))
continue;
@@ -1,8 +1,3 @@
2004-07-20 Gonzalo Paniagua Javier <[email protected]>
* UrlUtils.cs: don't pass double slash when the path begins with a
tilde. Fixes bug #61654.
2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* UrlUtils.cs:
@@ -154,11 +154,7 @@ namespace System.Web.Util
slash = "/";
}
string appvpath = HttpRuntime.AppDomainAppVirtualPath;
if (appvpath.EndsWith ("/"))
slash = "";
return Reduce (appvpath + slash + relPath);
return Reduce (HttpRuntime.AppDomainAppVirtualPath + slash + relPath);
}
return Reduce (basePath + slash + relPath);
-24
View File
@@ -1,27 +1,3 @@
2004-07-21 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: the file not found might be a dependency.
2004-07-20 Gonzalo Paniagua Javier <[email protected]>
* HttpCookie.cs: use invariant when formatting expires date. Fixes bug
#61690.
2004-07-07 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: don't keep the session around if we got it from
the context. Fixes bug #61232.
2004-07-06 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: fixed stupid bug in UrlDecode from bytes. Closes bug
#61181.
2004-07-02 Gonzalo Paniagua Javier <[email protected]>
* TraceContext.cs: added internal HaveTrace property whose
value is true when the page has a Trace attribute.
2004-06-15 Gonzalo Paniagua Javier <[email protected]>
* TraceData.cs: fixed <br> output. Closes bug #60181.
@@ -805,12 +805,7 @@ namespace System.Web
return ret;
} catch (DirectoryNotFoundException) {
throw new HttpException (404, "Cannot find '" + file + "'.");
} catch (FileNotFoundException fnf) {
string fname = fnf.FileName;
if (fname != null && fname != "") {
file = Path.GetFileName (fname);
}
} catch (FileNotFoundException) {
throw new HttpException (404, "Cannot find '" + file + "'.");
}
}
@@ -1150,8 +1145,10 @@ namespace System.Web
if (null != _Session)
return _Session;
if (null != _Context && null != _Context.Session)
return _Context.Session;
if (null != _Context && null != _Context.Session) {
_Session = _Context.Session;
return _Session;
}
throw new HttpException ("Failed to get session object");
}
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Globalization;
using System.Text;
using System.Web;
using System.Collections.Specialized;
@@ -99,9 +98,7 @@ namespace System.Web
if (_ExpiresSet && _Expires != DateTime.MinValue) {
oSetCookie.Append ("; expires=");
DateTime ut = _Expires.ToUniversalTime ();
oSetCookie.Append (ut.ToString ("ddd, dd-MMM-yyyy HH':'mm':'ss 'GMT'",
DateTimeFormatInfo.InvariantInfo));
oSetCookie.Append (_Expires.ToUniversalTime ().ToString ("ddd, dd-MMM-yyyy HH':'mm':'ss '+0000'"));
}
if (_Secure)
@@ -444,7 +444,7 @@ namespace System.Web {
int value = 0;
int end = length + offset;
for (int i = offset; i < end; i++)
value = (value << 4) + GetInt (bytes [i]);
value = (value << 4) + GetInt (bytes [offset]);
return (char) value;
}
@@ -474,10 +474,10 @@ namespace System.Web {
output.Append (GetChars (acc, e));
acc.SetLength (0);
}
output.Append (GetChar (bytes, i + 2, 4));
output.Append (GetChar (bytes, offset + 2, 4));
i += 5;
} else {
acc.WriteByte ((byte) GetChar (bytes, i + 1, 2));
acc.WriteByte ((byte) GetChar (bytes, offset + 1, 2));
i += 2;
}
continue;
@@ -42,19 +42,11 @@ namespace System.Web {
private TraceMode _Mode;
private TraceData data;
private bool data_saved;
private bool _haveTrace = false;
public TraceContext(HttpContext Context) {
_Context = Context;
_Enabled = false;
}
internal bool HaveTrace {
get {
return _haveTrace;
}
}
public bool IsEnabled {
get {
@@ -64,7 +56,6 @@ namespace System.Web {
set {
if (value && data == null)
data = new TraceData ();
_haveTrace = true;
_Enabled = value;
}
}
@@ -1,10 +1,3 @@
2004-07-30 Atsushi Enomoto <[email protected]>
* DTMXPathNavigator.cs :
Fixed IsSamePosition(). currentAttr is not always the same as
that of other when current is not attribute. Ditto for currentNS
(when current is not namespace).
2004-06-06 Atsushi Enomoto <[email protected]>
* DTMXPathDocumentBuilder.cs : Close XmlTextReader strictly. It might
@@ -366,16 +366,11 @@ namespace Mono.Xml.XPath
if (another == null || another.document != this.document)
return false;
if (this.currentNode != another.currentNode ||
this.currentIsAttr != another.currentIsAttr ||
this.currentIsNode != another.currentIsNode)
return false;
if (currentIsAttr)
return this.currentAttr == another.currentAttr;
else if (!currentIsNode)
return this.currentNs == another.currentNs;
return true;
return this.currentNode == another.currentNode &&
this.currentAttr == another.currentAttr &&
this.currentIsAttr == another.currentIsAttr &&
this.currentIsNode == another.currentIsNode &&
this.currentNs == another.currentNs;
}
public override bool MoveTo (XPathNavigator other)
@@ -1,9 +1,3 @@
2004-07-15 Lluis Sanchez Gual <[email protected]>
* TypeTranslator.cs, XmlCustomFormatter.cs: Added support for base64. This
xsd type is not part of the last schema specification, but the google api
uses it and ms.net accepts it.
2004-06-22 Lluis Sanchez Gual <[email protected]>
* ReflectionHelper.cs: Correctly detect private types.
@@ -106,7 +106,6 @@ namespace System.Xml.Serialization
primitiveTypes.Add ("token", new TypeData (typeof (string), "token", true));
primitiveTypes.Add ("normalizedString", new TypeData (typeof (string), "normalizedString", true));
primitiveTypes.Add ("anyURI", new TypeData (typeof (string), "anyURI", true));
primitiveTypes.Add ("base64", new TypeData (typeof (byte[]), "base64", true));
}
public static TypeData GetTypeData (Type type)
@@ -195,7 +195,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return XmlConvert.ToString ((UInt32)value);
case "unsignedLong": return XmlConvert.ToString ((UInt64)value);
case "guid": return XmlConvert.ToString ((Guid)value);
case "base64":
case "base64Binary": return Convert.ToBase64String ((byte[])value);
default: return value is IFormattable ? ((IFormattable) value).ToString (null, CultureInfo.InvariantCulture) : value.ToString ();
}
@@ -224,7 +223,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return XmlConvert.ToUInt32 (value);
case "unsignedLong": return XmlConvert.ToUInt64 (value);
case "guid": return XmlConvert.ToGuid (value);
case "base64":
case "base64Binary": return Convert.FromBase64String (value);
default:
if (type.Type != null)
@@ -255,7 +253,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return value + ".ToString(CultureInfo.InvariantCulture)";
case "unsignedLong": return value + ".ToString(CultureInfo.InvariantCulture)";
case "guid": return "XmlConvert.ToString (" + value + ")";
case "base64":
case "base64Binary": return "Convert.ToBase64String (" + value + ")";
case "NMTOKEN":
case "Name":
@@ -293,7 +290,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return "UInt32.Parse (" + value + ", CultureInfo.InvariantCulture)";
case "unsignedLong": return "UInt64.Parse (" + value + ", CultureInfo.InvariantCulture)";
case "guid": return "XmlConvert.ToGuid (" + value + ")";
case "base64:":
case "base64Binary": return "Convert.FromBase64String (" + value + ")";
default: return value;
}
-16
View File
@@ -1,19 +1,3 @@
2004-07-28 Lluis Sanchez Gual <[email protected]>
* XmlTextReader.cs: Stop parsing when a null character is found.
2004-07-20 Atsushi Enomoto <[email protected]>
* XmlNode.cs : When the argument node being inserted is the existing
document element, it should not result in an error (since it should
be first removed from document, thus no error should happen).
2004-07-16 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Fixed several problems on ReadBase64();
Whitespaces should be ignored, and '=' was not skipped correctly.
It caused "unexpected end of document" error at immediate close tag.
2004-06-18 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs, DTDReader.cs, XmlConvert.cs, XmlDocument.cs,
+1 -1
View File
@@ -524,7 +524,7 @@ namespace System.Xml
throw new ArgumentException ("The reference node is not a child of this node.");
}
if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement) && newChild != ownerDoc.DocumentElement)
if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement))
throw new XmlException ("multiple document element not allowed.");
// checking validity finished. then appending...
@@ -531,14 +531,6 @@ namespace System.Xml
return false;
}
private int SkipIgnorableBase64Chars (char [] chars, int charsLength, int i)
{
while (chars [i] == '=' || XmlChar.IsWhitespace (chars [i]))
if (charsLength == ++i)
break;
return i;
}
public int ReadBase64 (byte [] buffer, int offset, int length)
{
if (offset < 0)
@@ -575,9 +567,7 @@ namespace System.Xml
byte b = 0;
byte work = 0;
for (int i = 0; i < charsLength - 3; i++) {
if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
break;
for (int i = 0; i < charsLength - 3; i += 4) {
b = (byte) (GetBase64Byte (chars [i]) << 2);
if (bufIndex < bufLast)
buffer [bufIndex] = b;
@@ -587,11 +577,9 @@ namespace System.Xml
base64Cache [0] = b;
}
// charsLength mod 4 might not equals to 0.
if (++i == charsLength)
if (i + 1 == charsLength)
break;
if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
break;
b = GetBase64Byte (chars [i]);
b = GetBase64Byte (chars [i + 1]);
work = (byte) (b >> 4);
if (bufIndex < bufLast) {
buffer [bufIndex] += work;
@@ -610,11 +598,9 @@ namespace System.Xml
base64Cache [1] = work;
}
if (++i == charsLength)
if (i + 2 == charsLength)
break;
if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
break;
b = GetBase64Byte (chars [i]);
b = GetBase64Byte (chars [i + 2]);
work = (byte) (b >> 2);
if (bufIndex < bufLast) {
buffer [bufIndex] += work;
@@ -631,11 +617,9 @@ namespace System.Xml
base64CacheStartsAt = 2;
base64Cache [2] = work;
}
if (++i == charsLength)
if (i + 3 == charsLength)
break;
if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
break;
work = GetBase64Byte (chars [i]);
work = GetBase64Byte (chars [i + 3]);
if (bufIndex < bufLast) {
buffer [bufIndex] += work;
bufIndex++;
@@ -1146,11 +1130,8 @@ namespace System.Xml
return -1;
return PeekChar ();
}
else {
char c = peekChars [peekCharsIndex];
if (c != 0) return c;
else return -1;
}
else
return peekChars [peekCharsIndex];
}
private int ReadChar ()
@@ -1167,8 +1148,6 @@ namespace System.Xml
if (ch == '\n') {
line++;
column = 1;
} else if (ch == 0) {
return -1;
} else {
column++;
}
@@ -2569,8 +2548,6 @@ namespace System.Xml
return;
}
// Since ReadBase64() is processed for every 4 chars, it does
// not handle '=' here.
private byte GetBase64Byte (char ch)
{
switch (ch) {
@@ -2578,6 +2555,8 @@ namespace System.Xml
return 62;
case '/':
return 63;
case '=':
return 0;
default:
if (ch >= 'A' && ch <= 'Z')
return (byte) (ch - 'A');
@@ -2598,6 +2577,8 @@ namespace System.Xml
return 0;
}
shouldSkipUntilEndTag = true;
if (offset < 0)
throw new ArgumentOutOfRangeException ("offset", offset, "Offset must be non-negative integer.");
else if (length < 0)
@@ -2608,8 +2589,6 @@ namespace System.Xml
if (NodeType != XmlNodeType.Element)
return 0;
shouldSkipUntilEndTag = true;
int bufIndex = offset;
for (int i = 0; i < length; i++) {
int c = PeekChar ();
@@ -2628,9 +2607,9 @@ namespace System.Xml
depth++;
depthUp = false;
}
ReadEndTag ();
ReadEndTag();
shouldSkipUntilEndTag = false;
Read (); // move to the next node
Read ();
return i;
default:
ReadChar ();
@@ -97,7 +97,7 @@ namespace Mono.CSharp
StringCollection assemblies = options.ReferencedAssemblies;
foreach (CodeCompileUnit e in ea) {
fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, i.ToString () + ".cs");
fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, "cs");
FileStream f=new FileStream(fileNames[i],FileMode.OpenOrCreate);
StreamWriter s=new StreamWriter(f, Encoding.UTF8);
if (e.ReferencedAssemblies != null) {
@@ -183,7 +183,7 @@ namespace Mono.CSharp
string[] fileNames=new string[sources.Length];
int i=0;
foreach (string source in sources) {
fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, i.ToString () + ".cs");
fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, "cs");
FileStream f=new FileStream(fileNames[i],FileMode.OpenOrCreate);
StreamWriter s=new StreamWriter(f);
s.Write(source);
@@ -503,10 +503,7 @@ namespace Mono.CSharp
OutputMemberAccessModifier( attributes );
OutputFieldScopeModifier( attributes );
if (IsCurrentEnum)
Output.Write(field.Name);
else
OutputTypeNamePair( field.Type, GetSafeName (field.Name) );
OutputTypeNamePair( field.Type, GetSafeName (field.Name) );
CodeExpression initExpression = field.InitExpression;
if ( initExpression != null ) {
@@ -1,13 +1,3 @@
2004-07-13 Peter Williams <[email protected]>
* CSharpCodeCompiler.cs (CompileAssemblyFromDomBatch): Include
counter in the extension so that batch compilations work.
(CompileAssemblyFromSourceBatch): Same.
2004-07-12 Fawad Halim <[email protected]>
* CSharpCodeGenerator.cs : Have GenerateField generate field sans the type for enums.
2004-06-28 Atsushi Enomoto <[email protected]>
* CSharpCodeCompiler.cs : (only for windows) First check mcs.bat, then
@@ -1,9 +1,3 @@
2004-07-15 Peter Williams <[email protected]>
* CodeGenerator.cs: Have the basic generator create line pragmas
for NamespaceImports, SnippetCompileUnits, and TypeMembers, all of
which had LinePragma members which were going unused.
2004-06-17 Jackson Harper <[email protected]>
* CompilerError.cs:
@@ -392,16 +392,9 @@ namespace System.CodeDom.Compiler {
GenerateNamespaceStart (ns);
foreach (CodeNamespaceImport import in ns.Imports) {
if (import.LinePragma != null)
GenerateLinePragmaStart (import.LinePragma);
foreach (CodeNamespaceImport import in ns.Imports)
GenerateNamespaceImport (import);
if (import.LinePragma != null)
GenerateLinePragmaEnd (import.LinePragma);
}
output.WriteLine();
foreach (CodeTypeDeclaration type in ns.Types) {
@@ -417,15 +410,8 @@ namespace System.CodeDom.Compiler {
protected abstract void GenerateNamespaceImport (CodeNamespaceImport i);
protected void GenerateNamespaceImports (CodeNamespace e)
{
foreach (CodeNamespaceImport import in e.Imports) {
if (import.LinePragma != null)
GenerateLinePragmaStart (import.LinePragma);
foreach (CodeNamespaceImport import in e.Imports)
GenerateNamespaceImport (import);
if (import.LinePragma != null)
GenerateLinePragmaEnd (import.LinePragma);
}
}
protected void GenerateNamespaces (CodeCompileUnit e)
@@ -486,14 +472,7 @@ namespace System.CodeDom.Compiler {
protected virtual void GenerateSnippetCompileUnit (CodeSnippetCompileUnit e)
{
if (e.LinePragma != null)
GenerateLinePragmaStart (e.LinePragma);
output.WriteLine (e.Value);
if (e.LinePragma != null)
GenerateLinePragmaEnd (e.LinePragma);
}
protected abstract void GenerateSnippetExpression (CodeSnippetExpression e);
@@ -990,17 +969,11 @@ namespace System.CodeDom.Compiler {
private void GenerateType (CodeTypeDeclaration type)
{
if (type.LinePragma != null)
GenerateLinePragmaStart (type.LinePragma);
CodeTypeDelegate del = type as CodeTypeDelegate;
if (del != null)
GenerateDelegate (del);
else
GenerateNonDelegateType (type);
if (type.LinePragma != null)
GenerateLinePragmaEnd (type.LinePragma);
}
private void GenerateDelegate (CodeTypeDelegate type)
@@ -1051,18 +1024,12 @@ namespace System.CodeDom.Compiler {
CodeTypeMember prevMember = this.currentMember;
this.currentMember = member;
if (prevMember != null && prevMember.LinePragma != null)
GenerateLinePragmaEnd (prevMember.LinePragma);
if (options.BlankLinesBetweenMembers)
output.WriteLine ();
foreach (CodeCommentStatement statement in member.Comments)
GenerateCommentStatement (statement);
if (member.LinePragma != null)
GenerateLinePragmaStart (member.LinePragma);
CodeMemberEvent eventm = member as CodeMemberEvent;
if (eventm != null)
{
@@ -1120,9 +1087,6 @@ namespace System.CodeDom.Compiler {
this.currentMember = prevMember;
}
if (currentMember != null && currentMember.LinePragma != null)
GenerateLinePragmaEnd (currentMember.LinePragma);
GenerateTypeEnd (type);
this.currentType = prevType;
@@ -1,23 +1,3 @@
2004-07-28 Dick Porter <[email protected]>
* Socket.cs: ReceiveFrom might not return a valid EndPoint. Patch
by Nick Vaughan ([email protected]), fixes bug 61608.
2004-07-15 Dick Porter <[email protected]>
* Socket.cs: Don't try and dereference a null array in Select()
(possible if a descriptor list of length 0 was passed.) Patch by
Nick Vaughan ([email protected]), fixes bug 61595.
2004-07-12 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: if'ed RemoveReferences calls.
2004-07-09 Dick Porter <[email protected]>
* Socket.cs: Slight tweak to allow unknown objects to be returned
by GetSocketOption().
2004-06-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: connect on non-blocking sockets returns EINPROGRESS. Fixes
+12 -31
View File
@@ -424,28 +424,22 @@ namespace System.Net.Sockets
if(read_list!=null) {
read_list.Clear();
if (read_arr != null) {
for(i=0; i<read_arr.Length; i++) {
read_list.Add(read_arr[i]);
}
for(i=0; i<read_arr.Length; i++) {
read_list.Add(read_arr[i]);
}
}
if(write_list!=null) {
write_list.Clear();
if (write_arr != null) {
for(i=0; i<write_arr.Length; i++) {
write_list.Add(write_arr[i]);
}
for(i=0; i<write_arr.Length; i++) {
write_list.Add(write_arr[i]);
}
}
if(err_list!=null) {
err_list.Clear();
if (err_arr != null) {
for(i=0; i<err_arr.Length; i++) {
err_list.Add(err_arr[i]);
}
for(i=0; i<err_arr.Length; i++) {
err_list.Add(err_arr[i]);
}
}
}
@@ -1026,9 +1020,7 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
if (supportsAsync && socket_type == SocketType.Stream)
RemoveReference (req);
RemoveReference (req);
if (!result.IsCompleted)
result.AsyncWaitHandle.WaitOne();
@@ -1071,9 +1063,7 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
if (supportsAsync && socket_type == SocketType.Stream)
RemoveReference (req);
RemoveReference (req);
if (!result.IsCompleted)
result.AsyncWaitHandle.WaitOne();
@@ -1141,10 +1131,8 @@ namespace System.Net.Sockets
} else if (name==SocketOptionName.AddMembership ||
name==SocketOptionName.DropMembership) {
return((MulticastOption)obj_val);
} else if (obj_val is int) {
return((int)obj_val);
} else {
return(obj_val);
return((int)obj_val);
}
}
@@ -1384,17 +1372,10 @@ namespace System.Net.Sockets
}
connected = true;
// If sockaddr is null then we're a connection
// oriented protocol and should ignore the
// remote_end parameter (see MSDN
// documentation for Socket.ReceiveFrom(...) )
if ( sockaddr != null ) {
// Stupidly, EndPoint.Create() is an
// instance method
remote_end = remote_end.Create (sockaddr);
}
// Stupidly, EndPoint.Create() is an
// instance method
remote_end = remote_end.Create (sockaddr);
return cnt;
}
-32
View File
@@ -1,35 +1,3 @@
2004-07-26 Gonzalo Paniagua Javier <[email protected]>
* WebProxy.cs: fix scheme detection. Patch by Konstantin Triger
([email protected]).
2004-07-16 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: detect changes in scheme or port when redirecting.
Fixes las take on bug 61218.
2004-07-14 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: moved loading of the ssl stream Type to its own
method. Don't create a new ssl stream if we're reusing the connection.
* WebConnectionStream.cs: ensure the number of bytes copied in ReadAll
is the expected even if the dta from the server has extra bytes.
2004-07-12 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
* WebConnectionStream.cs: when the status code is 1xx, 204 or 304,
"responses MUST NOT include a message-body". We tried to read the
stream even when getting those codes and considered the 0 length
read as a failure.
2004-07-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: removed bogus Monitor.Exit.
* WebConnection.cs: use Address instead of RequestUri when checking for
the scheme in order to select the stream type. Fixes bug #61218.
2004-06-06 Gonzalo Paniagua Javier <[email protected]>
* ChunkStream.cs: added ChunkLeft property.
@@ -584,6 +584,7 @@ namespace System.Net
initialMethod = method;
if (haveRequest) {
if (writeStream != null) {
Monitor.Exit (this);
asyncWrite.SetCompleted (true, writeStream);
asyncWrite.DoCallback ();
return asyncWrite;
@@ -829,7 +830,7 @@ namespace System.Net
throw new WebException ("No Location header found for " + (int) code,
WebExceptionStatus.ProtocolError);
Uri prev = actualUri;
string host = actualUri.Host;
try {
actualUri = new Uri (actualUri, uriString);
} catch (Exception) {
@@ -838,8 +839,7 @@ namespace System.Net
WebExceptionStatus.ProtocolError);
}
hostChanged = (actualUri.Scheme != prev.Scheme || actualUri.Host != prev.Host ||
actualUri.Port != prev.Port);
hostChanged = (actualUri.Host != host);
return true;
}
+20 -40
View File
@@ -71,7 +71,7 @@ namespace System.Net
bool ssl;
bool certsAvailable;
static object classLock = new object ();
static bool sslCheck;
static Type sslStream;
static PropertyInfo piClient;
static PropertyInfo piServer;
@@ -127,48 +127,36 @@ namespace System.Net
}
}
static void EnsureSSLStreamAvailable ()
{
lock (classLock) {
if (sslStream != null)
return;
// HttpsClientStream is an internal glue class in Mono.Security.dll
sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " +
Consts.AssemblyMono_Security, false);
if (sslStream == null) {
string msg = "Missing Mono.Security.dll assembly. " +
"Support for SSL/TLS is unavailable.";
throw new NotSupportedException (msg);
}
piClient = sslStream.GetProperty ("SelectedClientCertificate");
piServer = sslStream.GetProperty ("ServerCertificate");
}
}
bool CreateStream (HttpWebRequest request)
{
try {
NetworkStream serverStream = new NetworkStream (socket, false);
if (request.Address.Scheme == Uri.UriSchemeHttps) {
if (request.RequestUri.Scheme == Uri.UriSchemeHttps) {
ssl = true;
EnsureSSLStreamAvailable ();
if (!reused || nstream == null || nstream.GetType () != sslStream) {
object[] args = new object [3] { serverStream,
request.ClientCertificates,
request };
nstream = (Stream) Activator.CreateInstance (sslStream, args);
if (!sslCheck) {
lock (typeof (WebConnection)) {
sslCheck = true;
// HttpsClientStream is an internal glue class in Mono.Security.dll
sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " + Consts.AssemblyMono_Security, false);
if (sslStream != null) {
piClient = sslStream.GetProperty ("SelectedClientCertificate");
piServer = sslStream.GetProperty ("ServerCertificate");
}
}
}
if (sslStream == null)
throw new NotSupportedException ("Missing Mono.Security.dll assembly. Support for SSL/TLS is unavailable.");
object[] args = new object [4] { serverStream, request.RequestUri.Host, request.ClientCertificates, request };
nstream = (Stream) Activator.CreateInstance (sslStream, args);
// we also need to set ServicePoint.Certificate
// and ServicePoint.ClientCertificate but this can
// only be done later (after handshake - which is
// done only after a read operation).
} else {
ssl = false;
nstream = serverStream;
}
else
nstream = serverStream;
} catch (Exception) {
status = WebExceptionStatus.ConnectFailure;
return false;
@@ -280,9 +268,6 @@ namespace System.Net
data.stream = stream;
if (!ExpectContent (data.StatusCode))
stream.ForceCompletion ();
lock (cnc) {
lock (cnc.queue) {
if (cnc.queue.Count > 0) {
@@ -297,11 +282,6 @@ namespace System.Net
data.request.SetResponseData (data);
}
static bool ExpectContent (int statusCode)
{
return (statusCode >= 200 && statusCode != 204 && statusCode != 304);
}
internal void GetCertificates ()
{
// here the SSL negotiation have been done
@@ -57,7 +57,6 @@ namespace System.Net
byte [] headers;
bool disposed;
bool headersSent;
bool forceCompletion;
public WebConnectionStream (WebConnection cnc)
{
@@ -114,15 +113,9 @@ namespace System.Net
get { return (int) writeBuffer.Length; }
}
internal void ForceCompletion ()
{
forceCompletion = true;
}
internal void CheckComplete ()
{
bool nrc = nextReadCalled;
if (forceCompletion || (!nrc && readBufferSize - readBufferOffset == contentLength)) {
if (!nextReadCalled && readBufferSize - readBufferOffset == contentLength) {
nextReadCalled = true;
cnc.NextRead ();
}
@@ -158,12 +151,8 @@ namespace System.Net
} else {
new_size = contentLength - totalRead;
b = new byte [new_size];
if (readBuffer != null && diff > 0) {
if (diff > new_size)
diff = new_size;
if (readBuffer != null && diff > 0)
Buffer.BlockCopy (readBuffer, readBufferOffset, b, 0, diff);
}
int remaining = new_size - diff;
int r = -1;
+1 -1
View File
@@ -208,7 +208,7 @@ namespace System.Net
if (address == null)
return null;
if (address.IndexOf ("://") == -1)
if (address.IndexOf (':') == -1)
address = "http://" + address;
return new Uri (address);
@@ -1,13 +1,3 @@
2004-07-21 Geoff Norton <[email protected]>
* Hashtable.cs: lock the SyncRoot when Cloning a Synchronized hashtable to avoid
a snapshot out of sync error.
2004-07-21 Duncan Mak <[email protected]>
* DictionaryBase.cs: Rename the dictionary field to hashtable,
which causes a serialization interop bug. Fixes bug #61721.
2004-06-18 Ben Maurer <[email protected]>
* IKeyComparer.cs: v2 class
@@ -51,11 +51,11 @@ namespace System.Collections {
[Serializable]
public abstract class DictionaryBase : IDictionary, ICollection, IEnumerable {
Hashtable hashtable;
Hashtable dictionary;
protected DictionaryBase ()
{
hashtable = new Hashtable ();
dictionary = new Hashtable ();
}
/// <summary>
@@ -64,7 +64,7 @@ namespace System.Collections {
public void Clear ()
{
OnClear ();
hashtable.Clear ();
dictionary.Clear ();
OnClearComplete ();
}
@@ -73,7 +73,7 @@ namespace System.Collections {
/// </summary>
public int Count {
get {
return hashtable.Count;
return dictionary.Count;
}
}
@@ -91,7 +91,7 @@ namespace System.Collections {
/// </summary>
protected Hashtable InnerHashtable {
get {
return hashtable;
return dictionary;
}
}
@@ -129,7 +129,7 @@ namespace System.Collections {
/// </summary>
private void DoCopy (Array array, int index)
{
foreach (DictionaryEntry de in hashtable)
foreach (DictionaryEntry de in dictionary)
array.SetValue (de, index++);
}
@@ -138,7 +138,7 @@ namespace System.Collections {
/// </summary>
public IDictionaryEnumerator GetEnumerator ()
{
return hashtable.GetEnumerator ();
return dictionary.GetEnumerator ();
}
/// <summary>
@@ -311,20 +311,20 @@ namespace System.Collections {
object IDictionary.this [object key] {
get {
OnGet (key, hashtable [key]);
object value = hashtable [key];
OnGet (key, dictionary[key]);
object value = dictionary [key];
return value;
}
set {
OnValidate (key, value);
object current_value = hashtable [key];
object current_value = dictionary [key];
OnSet (key, current_value, value);
hashtable [key] = value;
dictionary [key] = value;
try {
OnSetComplete (key, current_value, value);
} catch {
hashtable [key] = current_value;
dictionary [key] = current_value;
throw;
}
}
@@ -332,13 +332,13 @@ namespace System.Collections {
ICollection IDictionary.Keys {
get {
return hashtable.Keys;
return dictionary.Keys;
}
}
ICollection IDictionary.Values {
get {
return hashtable.Values;
return dictionary.Values;
}
}
@@ -349,11 +349,11 @@ namespace System.Collections {
{
OnValidate (key, value);
OnInsert (key, value);
hashtable.Add (key, value);
dictionary.Add (key, value);
try {
OnInsertComplete (key, value);
} catch {
hashtable.Remove (key);
dictionary.Remove(key);
throw;
}
}
@@ -363,10 +363,10 @@ namespace System.Collections {
/// </summary>
void IDictionary.Remove (object key)
{
object value = hashtable [key];
object value = dictionary [key];
OnValidate (key, value);
OnRemove (key, value);
hashtable.Remove (key);
dictionary.Remove (key);
OnRemoveComplete (key, value);
}
@@ -375,24 +375,24 @@ namespace System.Collections {
/// </summary>
bool IDictionary.Contains (object key)
{
return hashtable.Contains (key);
return dictionary.Contains (key);
}
bool ICollection.IsSynchronized {
get {
return hashtable.IsSynchronized;
return dictionary.IsSynchronized;
}
}
object ICollection.SyncRoot {
get {
return hashtable.SyncRoot;
return dictionary.SyncRoot;
}
}
IEnumerator IEnumerable.GetEnumerator ()
{
return hashtable.GetEnumerator ();
return dictionary.GetEnumerator ();
}
}
}
@@ -1114,9 +1114,8 @@ namespace System.Collections {
public override object Clone ()
{
lock(host.SyncRoot) {
return new SyncHashtable( (Hashtable) host.Clone () );
}
Hashtable ht = (Hashtable) host.Clone ();
return new SyncHashtable (ht);
}
} // SyncHashtable
@@ -1,3 +1,8 @@
Wed Jun 30 17:06:43 CEST 2004 Paolo Molaro <[email protected]>
* NumberFormatInfo.cs: workaround for bug 55978.
2004-06-17 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs : check if pattern array is empty or not. Now
@@ -851,7 +851,10 @@ throw new Exception ("HERE the value was modified");
public object GetFormat (Type formatType)
{
return (formatType == typeof (NumberFormatInfo)) ? this : null;
// work around http://bugzilla.ximian.com/show_bug.cgi?id=55978
// the comparison fails because formatType likely comes from another domain
//return (formatType == typeof (NumberFormatInfo)) ? this : null;
return this;
}
public object Clone ()
@@ -1,7 +1,3 @@
2004-07-11 Gonzalo Paniagua Javier <[email protected]>
* IsolatedStorageInfo.cs: useGetFolderPath instead of getting "HOME".
2004-06-13 Gert Driesen <[email protected]>
* IsolatedStorage.cs: really mark the storage_scope field private
@@ -37,7 +37,7 @@ namespace System.IO.IsolatedStorage {
[MonoTODO("Unix Specific; generalize for Win32")]
internal static string GetIsolatedStorageDirectory ()
{
string home = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
string home = Environment.GetEnvironmentVariable ("HOME");
if (home == null)
home = "~";
-22
View File
@@ -1,25 +1,3 @@
2004-07-06 Dick Porter <[email protected]>
* MonoIO.cs: Add ERROR_INVALID_PARAMETER to the exception list.
Don't blow away the SetFileTime() error before the caller gets to
see it. Part of the bug fix to 60970.
2004-07-05 Dick Porter <[email protected]>
* CheckPermission.cs:
* File.cs:
* FileInfo.cs:
* MonoIO.cs:
* FileStream.cs: Give the filename when throwing
FileNotFoundException. Fixes bug 61120, based on patch from
Carlos Alberto Cesario <[email protected]>.
2004-07-05 Dick Porter <[email protected]>
* File.cs: File.Move() should check that the destination doesn't
already exist. Fixes bug 60915, patch based on one from Carlos
Alberto Cesario <[email protected]>.
2004-06-24 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: implemented GetLogicalDrives.
@@ -102,7 +102,7 @@ namespace System.IO
}
else
{
throw new FileNotFoundException("File not found", path);
throw new FileNotFoundException();
}
#endif
}
+2 -4
View File
@@ -70,7 +70,7 @@ namespace System.IO
if (dest.Trim () == "" || dest.IndexOfAny (Path.InvalidPathChars) != -1)
throw new ArgumentException ("dest");
if (!Exists (src))
throw new FileNotFoundException (src + " does not exist", src);
throw new FileNotFoundException (src + " does not exist");
if ((GetAttributes(src) & FileAttributes.Directory) == FileAttributes.Directory){
throw new ArgumentException(src + " is a directory");
@@ -261,11 +261,9 @@ namespace System.IO
if (dest.Trim () == "" || dest.IndexOfAny (Path.InvalidPathChars) != -1)
throw new ArgumentException ("dest");
if (!MonoIO.Exists (src, out error))
throw new FileNotFoundException (src + " does not exist", src);
throw new FileNotFoundException (src + " does not exist");
if (MonoIO.ExistsDirectory (dest, out error))
throw new IOException (dest + " is a directory");
if (MonoIO.Exists (dest, out error))
throw new IOException (dest + " already exists");
string DirName;
DirName = Path.GetDirectoryName(src);
+1 -1
View File
@@ -81,7 +81,7 @@ namespace System.IO {
public long Length {
get {
if (!Exists)
throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".", OriginalPath);
throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".");
return stat.Length;
}
+1 -1
View File
@@ -155,7 +155,7 @@ namespace System.IO
if (access == FileAccess.Read && mode != FileMode.Create && mode != FileMode.OpenOrCreate &&
mode != FileMode.CreateNew && !File.Exists (name))
throw new FileNotFoundException ("Could not find file \"" + name + "\".", name);
throw new FileNotFoundException ("Could not find file \"" + name + "\".");
if (mode == FileMode.CreateNew) {
string dname = Path.GetDirectoryName (name);
+2 -9
View File
@@ -63,8 +63,7 @@ namespace System.IO
// FIXME: add more exception mappings here
case MonoIOError.ERROR_FILE_NOT_FOUND:
message = String.Format ("Could not find file \"{0}\"", path);
return new FileNotFoundException (message,
path);
return new FileNotFoundException (message);
case MonoIOError.ERROR_PATH_NOT_FOUND:
message = String.Format ("Could not find a part of the path \"{0}\"", path);
@@ -82,10 +81,6 @@ namespace System.IO
message = String.Format ("Path is too long. Path: {0}", path);
return new PathTooLongException (message);
case MonoIOError.ERROR_INVALID_PARAMETER:
message = String.Format ("Invalid parameter");
return new IOException (message);
default:
message = String.Format ("Win32 IO returned {0}. Path: {1}", error, path);
return new IOException (message);
@@ -309,9 +304,7 @@ namespace System.IO
result = SetFileTime (handle, creation_time,
last_access_time,
last_write_time, out error);
MonoIOError ignore_error;
Close (handle, out ignore_error);
Close (handle, out error);
return result;
}
@@ -1,7 +1,3 @@
2004-07-24 Martin Baulig <[email protected]>
* TypeBuilder.cs (TypeBuilder.UnspecifiedTypeSize): Set this to 0
and initialize it to 0 everywhere.
Thu Jun 24 15:33:04 CEST 2004 Paolo Molaro <[email protected]>
@@ -95,7 +95,7 @@ namespace System.Reflection.Emit {
internal TypeBuilder (ModuleBuilder mb, TypeAttributes attr) {
this.parent = null;
this.attrs = attr;
this.class_size = 0;
this.class_size = -1;
fullname = this.tname = "<Module>";
this.nspace = "";
pmodule = mb;
@@ -1,12 +1,3 @@
Sat Jul 10 15:48:34 CEST 2004 Paolo Molaro <[email protected]>
* Modulec.s: return just name in ToString (bug #61287).
2004-07-03 Zoltan Varga <[email protected]>
* Module.cs: Initialize FilterTypeName[IgnoreCase]. Fixes #61048.
2004-06-17 Gert Driesen <[email protected]>
* Pointer.cs: remove serializable attribute to match MS.NET
Loaded 100 of 141 files, more files were not shown because too many files have changed in this diff. Show more