mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
Compare commits
42
Commits
master
...
mono-1-2-4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c2f76b300 | ||
|
|
de58a8ba02 | ||
|
|
995f8bd46d | ||
|
|
e6bd1255de | ||
|
|
bf8646f208 | ||
|
|
8f7c2e184a | ||
|
|
69353f9111 | ||
|
|
54a48bd938 | ||
|
|
cca83223cb | ||
|
|
e1cc35b3a0 | ||
|
|
1d66b59a7f | ||
|
|
f39f4b31e2 | ||
|
|
61a79e6009 | ||
|
|
48c4db1ca6 | ||
|
|
f67bfbe8e1 | ||
|
|
f03066febb | ||
|
|
1ce5cfae4b | ||
|
|
34617d3eed | ||
|
|
0b8b41b4e4 | ||
|
|
32732d435c | ||
|
|
c1ad57de26 | ||
|
|
67d6aaeede | ||
|
|
0533b6b2c5 | ||
|
|
54d3c2c1a2 | ||
|
|
afc9932381 | ||
|
|
c7b13f4722 | ||
|
|
77120fc229 | ||
|
|
2e2b56e077 | ||
|
|
df084c62fe | ||
|
|
0650d531b1 | ||
|
|
6182087b43 | ||
|
|
ea18aae2a8 | ||
|
|
9c4001aaf8 | ||
|
|
e490cf105c | ||
|
|
5a1670d256 | ||
|
|
d78f44839d | ||
|
|
07d970e263 | ||
|
|
fdaf91f667 | ||
|
|
8d9651280c | ||
|
|
1cc7889017 | ||
|
|
b6341e0939 | ||
|
|
049d4a3f23 |
No files matched your search
@@ -1,3 +1,8 @@
|
||||
2007-04-27 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/web.config: use fully qualified assembly names in
|
||||
<compilation><assemblies>.
|
||||
|
||||
2007-04-19 Wade Berrier <[email protected]>
|
||||
|
||||
* configure.in: version bump -> 1.2.4
|
||||
|
||||
@@ -100,13 +100,13 @@
|
||||
</compilers>
|
||||
<assemblies>
|
||||
<!--<add assembly="mscorlib" /> -->
|
||||
<add assembly="System" />
|
||||
<add assembly="System.Xml" />
|
||||
<add assembly="System.Configuration" />
|
||||
<add assembly="System.Data" />
|
||||
<add assembly="System.Web" />
|
||||
<add assembly="System.Web.Services" />
|
||||
<add assembly="System.Drawing" />
|
||||
<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="*" /> <!-- Add assemblies in bin directory -->
|
||||
</assemblies>
|
||||
<expressionBuilders>
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
2007-05-25 Andreia Gaita <[email protected]>
|
||||
Proper fixes for PieChart
|
||||
|
||||
* NumericUpDown.cs: Refactor code to fix regressions on #79950 and
|
||||
fixes for PieChart. suppress_validation should not be a counter,
|
||||
if there are several BeginInit calls, the first EndInit will
|
||||
activate validation. Fix exceptions thrown by set_Value.
|
||||
* UpDownBase.cs: ValidateText only if it's the user editing it.
|
||||
|
||||
2007-05-23 Andreia Gaita <[email protected]>
|
||||
|
||||
* NumericUpDown.cs: Fix PieChart by not returning from UpdateEditText
|
||||
without updating the text.
|
||||
|
||||
2007-05-22 Jackson Harper <[email protected]>
|
||||
|
||||
* RichTextBox.cs: Set the line endings correctly, when flushing
|
||||
RTF text.
|
||||
|
||||
2007-05-22 Jackson Harper <[email protected]>
|
||||
|
||||
* TreeView.cs: Setting top with a null node should set to the very
|
||||
top.
|
||||
|
||||
2007-04-23 Jackson Harper <[email protected]>
|
||||
|
||||
* TextBoxBase.cs: Non multiline textboxes shouldn't take the enter
|
||||
key. Fixes #81408.
|
||||
|
||||
2007-04-20 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripManager.cs: Fix a reported InvalidCastException when unmerging
|
||||
MenuStrips that contain ToolStripSeparators.
|
||||
|
||||
2007-04-19 Jackson Harper <[email protected]>
|
||||
|
||||
* TextBox.cs: Move the has_been_focused into the base control, so
|
||||
@@ -25807,5 +25841,3 @@
|
||||
XplatUIDriver.cs, XplatUIStructs.cs, XplatUIWin32.cs,
|
||||
XplatUIX11.cs, lang.cs:
|
||||
- Initial check-in
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace System.Windows.Forms {
|
||||
#endif
|
||||
public class NumericUpDown : UpDownBase, ISupportInitialize {
|
||||
#region Local Variables
|
||||
private int suppress_validation;
|
||||
private bool suppress_validation;
|
||||
private int decimal_places;
|
||||
private bool hexadecimal;
|
||||
private decimal increment;
|
||||
@@ -57,7 +57,7 @@ namespace System.Windows.Forms {
|
||||
|
||||
#region Public Constructors
|
||||
public NumericUpDown() {
|
||||
suppress_validation = 0;
|
||||
suppress_validation = false;
|
||||
decimal_places = 0;
|
||||
hexadecimal = false;
|
||||
increment = 1M;
|
||||
@@ -251,20 +251,23 @@ namespace System.Windows.Forms {
|
||||
public decimal Value {
|
||||
get {
|
||||
if (UserEdit)
|
||||
dvalue = ParseEditText (Text);
|
||||
ValidateEditText ();
|
||||
return dvalue;
|
||||
}
|
||||
|
||||
set {
|
||||
if (suppress_validation <= 0) {
|
||||
if ((value < minimum) || (value > maximum)) {
|
||||
throw new ArgumentException("NumericUpDown.Value must be within the specified Minimum and Maximum values", "value");
|
||||
}
|
||||
}
|
||||
if (value != dvalue) {
|
||||
if (!suppress_validation && ((value < minimum) || (value > maximum))) {
|
||||
#if NET_2_0
|
||||
throw new ArgumentOutOfRangeException ("value", "NumericUpDown.Value must be within the specified Minimum and Maximum values");
|
||||
#else
|
||||
throw new ArgumentException ("NumericUpDown.Value must be within the specified Minimum and Maximum values", "value");
|
||||
#endif
|
||||
}
|
||||
|
||||
dvalue = value;
|
||||
OnValueChanged(EventArgs.Empty);
|
||||
Text = UpdateEditText (dvalue);
|
||||
OnValueChanged (EventArgs.Empty);
|
||||
UpdateEditText ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -272,13 +275,13 @@ namespace System.Windows.Forms {
|
||||
|
||||
#region Public Instance Methods
|
||||
public void BeginInit() {
|
||||
suppress_validation++;
|
||||
suppress_validation = true;
|
||||
}
|
||||
|
||||
public void EndInit() {
|
||||
suppress_validation--;
|
||||
if (suppress_validation == 0)
|
||||
UpdateEditText ();
|
||||
suppress_validation = false;
|
||||
Value = Check (dvalue);
|
||||
UpdateEditText ();
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
@@ -286,20 +289,19 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
|
||||
public override void DownButton() {
|
||||
decimal val = dvalue;
|
||||
if (UserEdit) {
|
||||
val = ParseEditText (Text);
|
||||
ParseEditText ();
|
||||
}
|
||||
|
||||
Value = Math.Max(minimum, unchecked(val - increment));
|
||||
Value = Math.Max (minimum, unchecked (dvalue - increment));
|
||||
}
|
||||
|
||||
public override void UpButton() {
|
||||
decimal val = dvalue;
|
||||
if (UserEdit)
|
||||
val = ParseEditText (Text);
|
||||
if (UserEdit) {
|
||||
ParseEditText ();
|
||||
}
|
||||
|
||||
Value = Math.Min(maximum, unchecked(val + increment));
|
||||
Value = Math.Min (maximum, unchecked (dvalue + increment));
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
@@ -341,53 +343,45 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
|
||||
protected void ParseEditText () {
|
||||
Value = ParseEditText (Text);
|
||||
UserEdit = false;
|
||||
}
|
||||
|
||||
private decimal ParseEditText (string text) {
|
||||
UserEdit = false;
|
||||
decimal ret = dvalue;
|
||||
|
||||
try {
|
||||
string user_edit_text = text;
|
||||
|
||||
if (!hexadecimal) {
|
||||
ret = decimal.Parse(user_edit_text, CultureInfo.CurrentCulture);
|
||||
Value = decimal.Parse (Text, CultureInfo.CurrentCulture);
|
||||
} else {
|
||||
#if !NET_2_0
|
||||
ret = Convert.ToDecimal (Convert.ToInt32 (user_edit_text, 16));
|
||||
Value = Check (Convert.ToDecimal (Convert.ToInt32 (Text, 16)));
|
||||
#else
|
||||
ret = Convert.ToDecimal (Convert.ToInt32 (user_edit_text, 10));
|
||||
Value = Check (Convert.ToDecimal (Convert.ToInt32 (Text, 10)));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ret < minimum) {
|
||||
ret = minimum;
|
||||
}
|
||||
|
||||
if (ret > maximum) {
|
||||
ret = maximum;
|
||||
}
|
||||
}
|
||||
catch {}
|
||||
catch { }
|
||||
finally {
|
||||
UserEdit = false;
|
||||
}
|
||||
}
|
||||
|
||||
private decimal Check (decimal val)
|
||||
{
|
||||
decimal ret = val;
|
||||
if (ret < minimum) {
|
||||
ret = minimum;
|
||||
}
|
||||
|
||||
if (ret > maximum) {
|
||||
ret = maximum;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
protected override void UpdateEditText() {
|
||||
Text = UpdateEditText (ParseEditText (Text));
|
||||
}
|
||||
|
||||
private string UpdateEditText (decimal val) {
|
||||
if (suppress_validation > 0)
|
||||
return Text;
|
||||
|
||||
decimal ret = val;
|
||||
string text = Text;
|
||||
protected override void UpdateEditText () {
|
||||
if (suppress_validation)
|
||||
return;
|
||||
|
||||
if (UserEdit)
|
||||
ret = ParseEditText (text); // parse user input
|
||||
ParseEditText ();
|
||||
|
||||
ChangingText = true;
|
||||
if (!hexadecimal) {
|
||||
// "N" and "F" differ only in that "N" includes commas
|
||||
// every 3 digits to the left of the decimal and "F"
|
||||
@@ -403,15 +397,14 @@ namespace System.Windows.Forms {
|
||||
|
||||
format_string += decimal_places;
|
||||
|
||||
ChangingText = true;
|
||||
text = ret.ToString(format_string, CultureInfo.CurrentCulture);
|
||||
}
|
||||
else {
|
||||
Text = dvalue.ToString (format_string, CultureInfo.CurrentCulture);
|
||||
|
||||
} else {
|
||||
// Decimal.ToString doesn't know the "X" formatter, and
|
||||
// converting it to an int is narrowing, so do it
|
||||
// manually...
|
||||
|
||||
int[] bits = decimal.GetBits(ret);
|
||||
int[] bits = decimal.GetBits (dvalue);
|
||||
|
||||
bool negative = (bits[3] < 0);
|
||||
|
||||
@@ -423,59 +416,56 @@ namespace System.Windows.Forms {
|
||||
|
||||
radix[0] = 1;
|
||||
|
||||
for (int i=0; i < scale; i++)
|
||||
wide_number_multiply_by_10(radix);
|
||||
for (int i = 0; i < scale; i++)
|
||||
wide_number_multiply_by_10 (radix);
|
||||
|
||||
int num_chars = 0;
|
||||
|
||||
while (!wide_number_less_than(bits, radix)) {
|
||||
while (!wide_number_less_than (bits, radix)) {
|
||||
num_chars++;
|
||||
wide_number_multiply_by_16(radix);
|
||||
wide_number_multiply_by_16 (radix);
|
||||
}
|
||||
|
||||
if (num_chars == 0) {
|
||||
// ChangingText = true;
|
||||
text = "0";
|
||||
return text;
|
||||
Text = "0";
|
||||
}
|
||||
|
||||
StringBuilder chars = new StringBuilder ();
|
||||
|
||||
if (negative)
|
||||
chars.Append('-');
|
||||
chars.Append ('-');
|
||||
|
||||
for (int i=0; i < num_chars; i++) {
|
||||
for (int i = 0; i < num_chars; i++) {
|
||||
int digit = 0;
|
||||
|
||||
wide_number_divide_by_16(radix);
|
||||
wide_number_divide_by_16 (radix);
|
||||
|
||||
while (!wide_number_less_than(bits, radix)) { // greater than or equals
|
||||
while (!wide_number_less_than (bits, radix)) { // greater than or equals
|
||||
digit++;
|
||||
wide_number_subtract(bits, radix);
|
||||
wide_number_subtract (bits, radix);
|
||||
}
|
||||
|
||||
if (digit < 10) {
|
||||
chars.Append((char)('0' + digit));
|
||||
chars.Append ((char) ('0' + digit));
|
||||
} else {
|
||||
chars.Append((char)('A' + digit - 10));
|
||||
chars.Append ((char) ('A' + digit - 10));
|
||||
}
|
||||
}
|
||||
|
||||
// ChangingText = true;
|
||||
text = chars.ToString();
|
||||
Text = chars.ToString ();
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
protected override void ValidateEditText() {
|
||||
Value = ParseEditText (Text);
|
||||
ParseEditText ();
|
||||
UpdateEditText ();
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
protected override void OnLostFocus(EventArgs e) {
|
||||
base.OnLostFocus(e);
|
||||
if (this.UserEdit)
|
||||
this.UpdateEditText();
|
||||
if (UserEdit)
|
||||
UpdateEditText();
|
||||
}
|
||||
#endif
|
||||
#endregion // Protected Instance Methods
|
||||
|
||||
@@ -1503,8 +1503,11 @@ namespace System.Windows.Forms {
|
||||
|
||||
rtf_chars += rtf_line.Length;
|
||||
|
||||
|
||||
|
||||
if (rtf_cursor_x == 0) {
|
||||
document.Add(rtf_cursor_y, rtf_line.ToString(), rtf_rtfalign, font, rtf_color, LineEnding.Wrap);
|
||||
document.Add(rtf_cursor_y, rtf_line.ToString(), rtf_rtfalign, font, rtf_color,
|
||||
newline ? LineEnding.Rich : LineEnding.Wrap);
|
||||
if (rtf_par_line_left_indent != 0) {
|
||||
Line line = document.GetLine (rtf_cursor_y);
|
||||
line.indent = rtf_par_line_left_indent;
|
||||
@@ -1516,10 +1519,14 @@ namespace System.Windows.Forms {
|
||||
line.indent = rtf_par_line_left_indent;
|
||||
if (rtf_line.Length > 0) {
|
||||
document.InsertString(line, rtf_cursor_x, rtf_line.ToString());
|
||||
document.FormatText(line, rtf_cursor_x + 1, line, rtf_cursor_x + 1 + length, font, rtf_color, null, FormatSpecified.Font | FormatSpecified.Color); // FormatText is 1-based
|
||||
document.FormatText (line, rtf_cursor_x + 1, line, rtf_cursor_x + 1 + length,
|
||||
font, rtf_color, null,
|
||||
FormatSpecified.Font | FormatSpecified.Color);
|
||||
}
|
||||
if (newline) {
|
||||
document.Split(line, rtf_cursor_x + length);
|
||||
line = document.GetLine (rtf_cursor_y);
|
||||
line.ending = LineEnding.Rich;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -786,7 +786,7 @@ namespace System.Windows.Forms {
|
||||
|
||||
switch (keyData & Keys.KeyCode) {
|
||||
case Keys.Enter: {
|
||||
if (accepts_return) {
|
||||
if (accepts_return && document.multiline) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1113,7 +1113,7 @@ namespace System.Windows.Forms {
|
||||
|
||||
case Keys.Enter: {
|
||||
// ignoring accepts_return, fixes bug #76355
|
||||
if (!read_only && (accepts_return || (FindForm() != null && FindForm().AcceptButton == null) || ((Control.ModifierKeys & Keys.Control) != 0))) {
|
||||
if (!read_only && document.multiline && (accepts_return || (FindForm() != null && FindForm().AcceptButton == null) || ((Control.ModifierKeys & Keys.Control) != 0))) {
|
||||
Line line;
|
||||
|
||||
if (document.selection_visible) {
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace System.Windows.Forms
|
||||
if (tsi.Owner == sourceToolStrip)
|
||||
items_to_move.Add (tsi);
|
||||
else if (tsi is ToolStripMenuItem)
|
||||
foreach (ToolStripMenuItem menuitem in (tsi as ToolStripMenuItem).DropDownItems)
|
||||
foreach (ToolStripItem menuitem in (tsi as ToolStripMenuItem).DropDownItems)
|
||||
foreach (ToolStripMenuItem tsmi in sourceToolStrip.Items)
|
||||
if (menuitem.Owner == tsmi.DropDown)
|
||||
items_to_move.Add (menuitem);
|
||||
|
||||
@@ -1118,12 +1118,16 @@ namespace System.Windows.Forms {
|
||||
|
||||
internal void SetTop (TreeNode node)
|
||||
{
|
||||
int order = 0;
|
||||
if (node != null)
|
||||
order = node.visible_order - 1;
|
||||
|
||||
if (!vbar.is_visible) {
|
||||
skipped_nodes = node.visible_order;
|
||||
skipped_nodes = order;
|
||||
return;
|
||||
}
|
||||
|
||||
vbar.Value = Math.Min (node.visible_order, vbar.Maximum - VisibleCount);
|
||||
vbar.Value = Math.Min (order, vbar.Maximum - VisibleCount + 1);
|
||||
}
|
||||
|
||||
internal void SetBottom (TreeNode node)
|
||||
|
||||
@@ -531,11 +531,8 @@ namespace System.Windows.Forms
|
||||
return "";
|
||||
}
|
||||
set {
|
||||
bool suppress_validation = changing_text;
|
||||
|
||||
txtView.Text = value;
|
||||
|
||||
if (!suppress_validation)
|
||||
if (this.UserEdit)
|
||||
ValidateEditText();
|
||||
|
||||
txtView.SelectionLength = 0;
|
||||
@@ -677,7 +674,7 @@ namespace System.Windows.Forms
|
||||
|
||||
protected virtual void OnTextBoxLostFocus (object source, EventArgs e)
|
||||
{
|
||||
if (user_edit) {
|
||||
if (UserEdit) {
|
||||
ValidateEditText();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-24 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* InternalConfigurationHost.cs : machine configuration covers all
|
||||
ConfigurationAllowDefinition values.
|
||||
|
||||
2007-04-17 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* ConfigurationSectionCollection.cs : GetEnumerator() should return
|
||||
|
||||
@@ -322,7 +322,12 @@ namespace System.Configuration
|
||||
configPath = null;
|
||||
locationConfigPath = null;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,14 @@
|
||||
2007-05-18 Rolf Bjarne Kvinge <[email protected]>
|
||||
|
||||
[Backported from #77750]
|
||||
|
||||
* CustomDataClassGenerator.cs: Misc fixes in order to emit correct VB code.
|
||||
CreateDataSetDefaultCtor: we're creating a delegate, not an object, so use a DelegateCreateExpression.
|
||||
CreateDataSetSchemaChanged: we're comparing value types, use the correct equality operator.
|
||||
CreateTableGetEnumerator: explicity state that the method is an implementation of IEnumerable.GetEnumerator.
|
||||
CreateTableEventStarter: we're invoking a delegate, so use a DelegateInvokeExpression.
|
||||
Several changes to not generate members with names that only differ by case.
|
||||
|
||||
2007-02-23 Nagappan A <[email protected]>
|
||||
|
||||
* DataRow.cs (Item): Checks whether this DataRow exist in the
|
||||
|
||||
@@ -430,6 +430,11 @@ namespace System.Data
|
||||
return new CodeMethodInvokeExpression (target, name, parameters);
|
||||
}
|
||||
|
||||
private CodeBinaryOperatorExpression EqualsValue (CodeExpression exp1, CodeExpression exp2)
|
||||
{
|
||||
return new CodeBinaryOperatorExpression (exp1, CodeBinaryOperatorType.ValueEquality, exp2);
|
||||
}
|
||||
|
||||
// note that this is "Identity" equality comparison
|
||||
private CodeBinaryOperatorExpression Equals (CodeExpression exp1, CodeExpression exp2)
|
||||
{
|
||||
@@ -552,7 +557,13 @@ namespace System.Data
|
||||
VarDecl (
|
||||
typeof (CollectionChangeEventHandler),
|
||||
"handler",
|
||||
New (typeof (CollectionChangeEventHandler), FieldRef ("SchemaChanged")));
|
||||
New (
|
||||
typeof (CollectionChangeEventHandler),
|
||||
new CodeDelegateCreateExpression (
|
||||
new CodeTypeReference (typeof (CollectionChangeEventHandler)),
|
||||
new CodeThisReferenceExpression (),
|
||||
"SchemaChanged")));
|
||||
|
||||
ctor.Statements.Add (stmt2);
|
||||
|
||||
// Code: Tables.CollectionChanged += handler;
|
||||
@@ -860,7 +871,7 @@ namespace System.Data
|
||||
|
||||
m.Statements.Add (
|
||||
new CodeConditionStatement (
|
||||
Equals (
|
||||
EqualsValue (
|
||||
PropRef (ParamRef ("e"), "Action"),
|
||||
FieldRef (TypeRefExp (typeof (CollectionChangeAction)), "Remove")),
|
||||
new CodeStatement [] { Eval (MethodInvoke ("InitializeFields")) },
|
||||
@@ -989,8 +1000,8 @@ namespace System.Data
|
||||
{
|
||||
CodeConstructor c = new CodeConstructor ();
|
||||
c.Attributes = MemberAttributes.Assembly;
|
||||
c.Parameters.Add (Param (typeof (DataTable), "table"));
|
||||
c.BaseConstructorArgs.Add (PropRef (ParamRef ("table"), "TableName"));
|
||||
c.Parameters.Add (Param (typeof (DataTable), GetRowTableFieldName (dt)));
|
||||
c.BaseConstructorArgs.Add (PropRef (ParamRef (GetRowTableFieldName (dt)), "TableName"));
|
||||
// TODO: implement
|
||||
c.Statements.Add (Comment ("TODO: implement"));
|
||||
c.Statements.Add (Throw (New (typeof (NotImplementedException))));
|
||||
@@ -1061,6 +1072,7 @@ namespace System.Data
|
||||
m.Attributes = MemberAttributes.Public;
|
||||
m.ReturnType = TypeRef (typeof (IEnumerator));
|
||||
m.Statements.Add (Return (MethodInvoke (PropRef ("Rows"), "GetEnumerator")));
|
||||
m.ImplementationTypes.Add (TypeRef (typeof (IEnumerable)));
|
||||
return m;
|
||||
}
|
||||
|
||||
@@ -1225,9 +1237,9 @@ namespace System.Data
|
||||
ParamRef ("e"))));
|
||||
string eventName = opts.TableMemberName (dt.TableName, gen) + "Row" + type;
|
||||
CodeStatement trueStmt = Eval (
|
||||
MethodInvoke (
|
||||
eventName,
|
||||
This (),
|
||||
new CodeDelegateInvokeExpression(
|
||||
new CodeEventReferenceExpression (This (), eventName),
|
||||
This (),
|
||||
New (
|
||||
opts.EventArgsName (dt.TableName, gen),
|
||||
Cast (opts.RowName (dt.TableName, gen), PropRef (ParamRef ("e"), "Row")),
|
||||
@@ -1289,16 +1301,20 @@ namespace System.Data
|
||||
c.Attributes = MemberAttributes.Assembly;
|
||||
c.Parameters.Add (Param (typeof (DataRowBuilder), "builder"));
|
||||
c.BaseConstructorArgs.Add (ParamRef ("builder"));
|
||||
c.Statements.Add (Let (FieldRef ("table"), Cast (
|
||||
c.Statements.Add (Let (FieldRef (GetRowTableFieldName (dt)), Cast (
|
||||
opts.TableTypeName (dt.TableName, gen),
|
||||
PropRef ("Table"))));
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
private string GetRowTableFieldName (DataTable dt)
|
||||
{
|
||||
return "table" + dt.TableName;
|
||||
}
|
||||
private CodeMemberField CreateRowTableField (DataTable dt)
|
||||
{
|
||||
CodeMemberField f = new CodeMemberField ();
|
||||
f.Name = "table";
|
||||
f.Name = GetRowTableFieldName (dt);
|
||||
f.Type = TypeRef (opts.TableTypeName (dt.TableName, gen));
|
||||
return f;
|
||||
}
|
||||
@@ -1319,7 +1335,7 @@ namespace System.Data
|
||||
// return (type) ret;
|
||||
p.GetStatements.Add (VarDecl (typeof (object), "ret",
|
||||
IndexerRef (PropRef
|
||||
(PropRef ("table"),
|
||||
(PropRef (GetRowTableFieldName (dt)),
|
||||
opts.TableColName (col.ColumnName, gen) + "Column"))));
|
||||
p.GetStatements.Add (new CodeConditionStatement (
|
||||
Equals (
|
||||
@@ -1330,7 +1346,7 @@ namespace System.Data
|
||||
new CodeStatement [] {
|
||||
Return (Cast (col.DataType, Local ("ret"))) }));
|
||||
|
||||
p.SetStatements.Add (Let (IndexerRef (PropRef (PropRef ("table"), opts.TableColName (col.ColumnName, gen) + "Column")), new CodePropertySetValueReferenceExpression ()));
|
||||
p.SetStatements.Add (Let (IndexerRef (PropRef (PropRef (GetRowTableFieldName (dt)), opts.TableColName (col.ColumnName, gen) + "Column")), new CodePropertySetValueReferenceExpression ()));
|
||||
|
||||
return p;
|
||||
}
|
||||
@@ -1345,7 +1361,7 @@ namespace System.Data
|
||||
"IsNull",
|
||||
// table[foo].[bar]Column
|
||||
PropRef (
|
||||
PropRef ("table"),
|
||||
PropRef (GetRowTableFieldName (dt)),
|
||||
opts.TableColName (col.ColumnName, gen) + "Column"))));
|
||||
return m;
|
||||
}
|
||||
@@ -1357,7 +1373,7 @@ namespace System.Data
|
||||
m.Attributes = MemberAttributes.Public;
|
||||
m.Statements.Add (Let (IndexerRef (
|
||||
PropRef (
|
||||
PropRef ("table"),
|
||||
PropRef (GetRowTableFieldName (dt)),
|
||||
opts.TableColName (col.ColumnName, gen) + "Column")),
|
||||
PropRef (TypeRefExp (typeof (DBNull)), "Value")));
|
||||
|
||||
@@ -1420,8 +1436,8 @@ namespace System.Data
|
||||
// Code:
|
||||
// public class [foo]ChangeEventArgs : EventArgs
|
||||
// {
|
||||
// private [foo]Row row;
|
||||
// private DataRowAction action;
|
||||
// private [foo]Row eventRow;
|
||||
// private DataRowAction eventAction;
|
||||
// (.ctor())
|
||||
// (Row)
|
||||
// (Action)
|
||||
@@ -1436,10 +1452,10 @@ namespace System.Data
|
||||
t.Members.Add (
|
||||
new CodeMemberField (
|
||||
TypeRef (opts.RowName (dt.TableName, gen)),
|
||||
"row"));
|
||||
"eventRow"));
|
||||
t.Members.Add (
|
||||
new CodeMemberField (
|
||||
TypeRef (typeof (DataRowAction)), "action"));
|
||||
TypeRef (typeof (DataRowAction)), "eventAction"));
|
||||
t.Members.Add (CreateEventCtor (dt));
|
||||
|
||||
t.Members.Add (CreateEventRow (dt));
|
||||
@@ -1452,8 +1468,8 @@ namespace System.Data
|
||||
// Code:
|
||||
// public [foo]RowChangeEventArgs ([foo]Row r, DataRowAction a)
|
||||
// {
|
||||
// row = r;
|
||||
// action = a;
|
||||
// eventRow = r;
|
||||
// eventAction = a;
|
||||
// }
|
||||
private CodeConstructor CreateEventCtor (DataTable dt)
|
||||
{
|
||||
@@ -1461,15 +1477,15 @@ namespace System.Data
|
||||
c.Attributes = MemberAttributes.Public;
|
||||
c.Parameters.Add (Param (TypeRef (opts.RowName (dt.TableName, gen)), "r"));
|
||||
c.Parameters.Add (Param (TypeRef (typeof (DataRowAction)), "a"));
|
||||
c.Statements.Add (Let (FieldRef ("row"), ParamRef ("r")));
|
||||
c.Statements.Add (Let (FieldRef ("action"), ParamRef ("a")));
|
||||
c.Statements.Add (Let (FieldRef ("eventRow"), ParamRef ("r")));
|
||||
c.Statements.Add (Let (FieldRef ("eventAction"), ParamRef ("a")));
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
// Code:
|
||||
// public [foo]Row Row {
|
||||
// get { return row; }
|
||||
// get { return eventRow; }
|
||||
// }
|
||||
private CodeMemberProperty CreateEventRow (DataTable dt)
|
||||
{
|
||||
@@ -1478,13 +1494,13 @@ namespace System.Data
|
||||
p.Attributes = MemberAttributes.Public | MemberAttributes.Final;
|
||||
p.Type = TypeRef (opts.RowName (dt.TableName, gen));
|
||||
p.HasSet = false;
|
||||
p.GetStatements.Add (Return (FieldRef ("row")));
|
||||
p.GetStatements.Add (Return (FieldRef ("eventRow")));
|
||||
return p;
|
||||
}
|
||||
|
||||
// Code:
|
||||
// public DataRowAction Action {
|
||||
// get { return action; }
|
||||
// get { return eventAction; }
|
||||
// }
|
||||
private CodeMemberProperty CreateEventAction (DataTable dt)
|
||||
{
|
||||
@@ -1493,7 +1509,7 @@ namespace System.Data
|
||||
p.Attributes = MemberAttributes.Public | MemberAttributes.Final;
|
||||
p.Type = TypeRef (typeof (DataRowAction));
|
||||
p.HasSet = false;
|
||||
p.GetStatements.Add (Return (FieldRef ("action")));
|
||||
p.GetStatements.Add (Return (FieldRef ("eventAction")));
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,48 @@ using System.Web.Util;
|
||||
|
||||
namespace System.Web.Compilation
|
||||
{
|
||||
class AssemblyPathResolver
|
||||
{
|
||||
static Dictionary <string, string> assemblyCache;
|
||||
|
||||
static AssemblyPathResolver ()
|
||||
{
|
||||
assemblyCache = new Dictionary <string, string> ();
|
||||
}
|
||||
|
||||
public static string GetAssemblyPath (string assemblyName)
|
||||
{
|
||||
lock (assemblyCache) {
|
||||
if (assemblyCache.ContainsKey (assemblyName))
|
||||
return assemblyCache [assemblyName];
|
||||
|
||||
Assembly asm = null;
|
||||
Exception error = null;
|
||||
if (assemblyName.IndexOf (',') != -1) {
|
||||
try {
|
||||
asm = Assembly.Load (assemblyName);
|
||||
} catch (Exception e) {
|
||||
error = e;
|
||||
}
|
||||
}
|
||||
|
||||
if (asm == null) {
|
||||
try {
|
||||
asm = Assembly.LoadWithPartialName (assemblyName);
|
||||
} catch (Exception e) {
|
||||
error = e;
|
||||
}
|
||||
}
|
||||
|
||||
if (asm == null)
|
||||
throw new HttpException (String.Format ("Unable to find assembly {0}", assemblyName), error);
|
||||
|
||||
assemblyCache.Add (assemblyName, asm.Location);
|
||||
return asm.Location;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class AppCodeAssembly
|
||||
{
|
||||
private List<string> files;
|
||||
@@ -190,8 +232,8 @@ namespace System.Web.Compilation
|
||||
foreach (AssemblyInfo ai in compilationSection.Assemblies)
|
||||
if (ai.Assembly != "*") {
|
||||
try {
|
||||
asmName = new AssemblyName (ai.Assembly);
|
||||
parameters.ReferencedAssemblies.Add (asmName.Name);
|
||||
parameters.ReferencedAssemblies.Add (
|
||||
AssemblyPathResolver.GetAssemblyPath (ai.Assembly));
|
||||
} catch (Exception ex) {
|
||||
throw new HttpException (
|
||||
String.Format ("Could not find assembly {0}.", ai.Assembly),
|
||||
@@ -210,7 +252,7 @@ namespace System.Web.Compilation
|
||||
}
|
||||
}
|
||||
|
||||
if (!known && !unknown)
|
||||
if (knownfiles.Count == 0 && unknownfiles.Count == 0 && units.Count == 0)
|
||||
return;
|
||||
|
||||
outputAssemblyName = (string)FileUtils.CreateTemporaryFile (
|
||||
@@ -220,7 +262,7 @@ namespace System.Web.Compilation
|
||||
foreach (Assembly a in BuildManager.TopLevelAssemblies)
|
||||
parameters.ReferencedAssemblies.Add (a.Location);
|
||||
CompilerResults results = abuilder.BuildAssembly (parameters);
|
||||
if (results.Errors.Count == 0) {
|
||||
if (results.NativeCompilerReturnValue == 0) {
|
||||
BuildManager.CodeAssemblies.Add (results.CompiledAssembly);
|
||||
BuildManager.TopLevelAssemblies.Add (results.CompiledAssembly);
|
||||
HttpRuntime.WritePreservationFile (results.CompiledAssembly, name);
|
||||
@@ -230,7 +272,7 @@ namespace System.Web.Compilation
|
||||
throw new CompilationException (null, results.Errors, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string PhysicalToVirtual (string file)
|
||||
{
|
||||
return file.Replace (HttpRuntime.AppDomainAppPath, "/").Replace (Path.DirectorySeparatorChar, '/');
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace System.Web.Compilation
|
||||
CompilerResults results = abuilder.BuildAssembly (cp);
|
||||
Assembly ret = null;
|
||||
|
||||
if (results.Errors.Count == 0) {
|
||||
if (results.NativeCompilerReturnValue == 0) {
|
||||
ret = results.CompiledAssembly;
|
||||
BuildManager.TopLevelAssemblies.Add (ret);
|
||||
HttpContext.AppGlobalResourcesAssembly = ret;
|
||||
@@ -203,7 +203,7 @@ namespace System.Web.Compilation
|
||||
CompilerResults results = abuilder.BuildAssembly (cp);
|
||||
Assembly ret = null;
|
||||
|
||||
if (results.Errors.Count == 0) {
|
||||
if (results.NativeCompilerReturnValue == 0) {
|
||||
ret = results.CompiledAssembly;
|
||||
AddAssemblyToCache (virtualPath, ret);
|
||||
} else {
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
2007-04-30 Marek Habersack <[email protected]>
|
||||
|
||||
* AppCodeCompiler.cs: support for cases when there exists a custom
|
||||
profile class but there is no App_Code directory or it's
|
||||
empty. Fixes bug #81489.
|
||||
|
||||
* TemplateControlCompiler.cs: fix generation of code for
|
||||
declarative attribute assignments of the form Font-Size="small"
|
||||
(i.e. when a font size is assigned a symbolic, relative size
|
||||
value). This fixes for example rendering of the 0th level of
|
||||
TreeView controls.
|
||||
|
||||
2007-04-27 Marek Habersack <[email protected]>
|
||||
|
||||
* AppCodeCompiler.cs: do not look at the number of errors, check
|
||||
the compiler return code instead.
|
||||
Resolve assembly names from the global web.config to their
|
||||
locations before passing them to the compiler provider.
|
||||
|
||||
* AssemblyBuilder.cs: as above
|
||||
|
||||
* AppResourcesCompiler.cs: as above
|
||||
|
||||
2007-04-26 Marek Habersack <[email protected]>
|
||||
|
||||
* PageCompiler.cs: the Master property must be in the partial
|
||||
class if present. Fixes bug #81442
|
||||
|
||||
2007-04-19 Gert Driesen <[email protected]>
|
||||
|
||||
* AspComponentFoundry.cs: Fixed build on 1.0 profile. Spaces to
|
||||
|
||||
@@ -269,7 +269,11 @@ namespace System.Web.Compilation
|
||||
CodeExpression prop = new CodePropertyReferenceExpression (new CodeBaseReferenceExpression (), "Master");
|
||||
prop = new CodeCastExpression (pageParser.MasterType, prop);
|
||||
mprop.GetStatements.Add (new CodeMethodReturnStatement (prop));
|
||||
mainClass.Members.Add (mprop);
|
||||
|
||||
if (partialClass != null)
|
||||
partialClass.Members.Add (mprop);
|
||||
else
|
||||
mainClass.Members.Add (mprop);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1776,12 +1776,30 @@ namespace System.Web.Compilation
|
||||
|
||||
if (value is System.Web.UI.WebControls.FontUnit) {
|
||||
System.Web.UI.WebControls.FontUnit s = (System.Web.UI.WebControls.FontUnit) value;
|
||||
|
||||
Type cParamType = null;
|
||||
object cParam = null;
|
||||
|
||||
switch (s.Type) {
|
||||
case FontSize.AsUnit:
|
||||
case FontSize.NotSet:
|
||||
cParamType = typeof (System.Web.UI.WebControls.Unit);
|
||||
cParam = s.Unit;
|
||||
break;
|
||||
|
||||
default:
|
||||
cParamType = typeof (string);
|
||||
cParam = s.Type.ToString ();
|
||||
break;
|
||||
}
|
||||
|
||||
ConstructorInfo c = typeof(System.Web.UI.WebControls.FontUnit).GetConstructor (
|
||||
BindingFlags.Instance | BindingFlags.Public,
|
||||
null,
|
||||
new Type[] {typeof(System.Web.UI.WebControls.Unit)},
|
||||
new Type[] {cParamType},
|
||||
null);
|
||||
return new InstanceDescriptor (c, new object[] {s.Unit});
|
||||
if (c != null)
|
||||
return new InstanceDescriptor (c, new object[] {cParam});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-24 Marek Habersack <[email protected]>
|
||||
|
||||
* WebConfigurationHost.cs: look for types in the top-level
|
||||
assemblies (App_Code and friends).
|
||||
|
||||
2007-04-19 Marek Habersack <[email protected]>
|
||||
|
||||
* HttpHandlerAction.cs: look up types in all the toplevel
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#if NET_2_0
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Security;
|
||||
using System.Configuration;
|
||||
@@ -109,6 +110,19 @@ namespace System.Web.Configuration
|
||||
if (type != null)
|
||||
return type;
|
||||
|
||||
IList tla = System.Web.Compilation.BuildManager.TopLevelAssemblies;
|
||||
if (tla != null && tla.Count > 0) {
|
||||
foreach (Assembly asm in tla) {
|
||||
if (asm == null)
|
||||
continue;
|
||||
type = asm.GetType (typeName, false);
|
||||
if (type != null)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (type != null)
|
||||
return type;
|
||||
|
||||
if (!Directory.Exists (PrivateBinPath))
|
||||
return null;
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2007-04-30 Marek Habersack <[email protected]>
|
||||
|
||||
* SessionInProcHandler.cs: do not end session when setting and
|
||||
releasing item in mid-session. Fixes bugs #81440, #81140 and
|
||||
#80723
|
||||
|
||||
2007-04-18 Marek Habersack <[email protected]>
|
||||
|
||||
* SessionInProcHandler.cs: added protection against raising early
|
||||
|
||||
@@ -294,6 +294,7 @@ namespace System.Web.SessionState
|
||||
} else {
|
||||
if (lockId == null || lockId.GetType() != typeof(Int32) || inProcItem.lockId != (Int32)lockId)
|
||||
return;
|
||||
inProcItem.resettingTimeout = true;
|
||||
cache.Remove (CacheId);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-27 Marek Habersack <[email protected]>
|
||||
|
||||
* HtmlHeadBuilder.cs: support <link> tags - we need to map virtual
|
||||
paths that might happen in them.
|
||||
|
||||
2007-04-18 Igor Zelmanovich <[email protected]>
|
||||
|
||||
* HtmlForm.cs: for TARGET_J2EE:
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#if NET_2_0
|
||||
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Web.UI.HtmlControls
|
||||
@@ -45,8 +46,10 @@ namespace System.Web.UI.HtmlControls
|
||||
|
||||
public override Type GetChildControlType (string tagName, IDictionary attribs)
|
||||
{
|
||||
if (string.Compare (tagName, "TITLE", true) == 0)
|
||||
return typeof(HtmlTitle);
|
||||
if (String.Compare (tagName, "title", true, CultureInfo.InvariantCulture) == 0)
|
||||
return typeof (HtmlTitle);
|
||||
if (String.Compare (tagName, "link", true, CultureInfo.InvariantCulture) == 0)
|
||||
return typeof (HtmlLink);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,8 +96,7 @@ namespace System.Web
|
||||
|
||||
if (data ["browser"] != null) { // Last one (most derived) will win.
|
||||
tbl ["browser"] = data ["browser"];
|
||||
}
|
||||
else if (tbl ["browser"] == null) { // If none so far defined value set to *
|
||||
} else if (tbl ["browser"] == null) { // If none so far defined value set to *
|
||||
tbl ["browser"] = "*";
|
||||
}
|
||||
|
||||
@@ -108,8 +107,8 @@ namespace System.Web
|
||||
((ArrayList) tbl ["browsers"]).Add (tbl["browser"]);
|
||||
|
||||
foreach (string key in data.Keys)
|
||||
tbl [key] = data [key];
|
||||
|
||||
tbl [key.ToLower (CultureInfo.InvariantCulture).Trim ()] = data [key];
|
||||
|
||||
return tbl;
|
||||
}
|
||||
|
||||
@@ -154,7 +153,7 @@ namespace System.Web
|
||||
#if TARGET_JVM
|
||||
regex = java.util.regex.Pattern.compile (pattern);
|
||||
#else
|
||||
regex = new Regex (pattern);
|
||||
regex = new Regex (pattern);
|
||||
#endif
|
||||
}
|
||||
#if TARGET_JVM
|
||||
@@ -218,29 +217,45 @@ namespace System.Web
|
||||
{
|
||||
defaultCaps = new Hashtable ();
|
||||
defaultCaps.Add ("activexcontrols", "False");
|
||||
defaultCaps.Add ("alpha", "False");
|
||||
defaultCaps.Add ("aol", "False");
|
||||
defaultCaps.Add ("aolversion", "0");
|
||||
defaultCaps.Add ("authenticodeupdate", "");
|
||||
defaultCaps.Add ("backgroundsounds", "False");
|
||||
defaultCaps.Add ("beta", "False");
|
||||
defaultCaps.Add ("browser", "*");
|
||||
defaultCaps.Add ("browsers", new ArrayList ());
|
||||
defaultCaps.Add ("cdf", "False");
|
||||
defaultCaps.Add ("clrversion", "0");
|
||||
defaultCaps.Add ("cookies", "False");
|
||||
defaultCaps.Add ("crawler", "False");
|
||||
defaultCaps.Add ("css", "0");
|
||||
defaultCaps.Add ("cssversion", "0");
|
||||
defaultCaps.Add ("ecmascriptversion", "0.0");
|
||||
defaultCaps.Add ("frames", "True");
|
||||
defaultCaps.Add ("frames", "False");
|
||||
defaultCaps.Add ("iframes", "False");
|
||||
defaultCaps.Add ("isbanned", "False");
|
||||
defaultCaps.Add ("ismobiledevice", "False");
|
||||
defaultCaps.Add ("issyndicationreader", "False");
|
||||
defaultCaps.Add ("javaapplets", "False");
|
||||
defaultCaps.Add ("javascript", "False");
|
||||
defaultCaps.Add ("majorver", "0");
|
||||
defaultCaps.Add ("minorver", "0");
|
||||
defaultCaps.Add ("msdomversion", "0.0");
|
||||
defaultCaps.Add ("platform", "Unknown");
|
||||
defaultCaps.Add ("tables", "True");
|
||||
defaultCaps.Add ("netclr", "False");
|
||||
defaultCaps.Add ("platform", "unknown");
|
||||
defaultCaps.Add ("stripper", "False");
|
||||
defaultCaps.Add ("supportscss", "False");
|
||||
defaultCaps.Add ("tables", "False");
|
||||
defaultCaps.Add ("vbscript", "False");
|
||||
defaultCaps.Add ("version", "0.0");
|
||||
defaultCaps.Add ("version", "0");
|
||||
defaultCaps.Add ("w3cdomversion", "0.0");
|
||||
defaultCaps.Add ("wap", "False");
|
||||
defaultCaps.Add ("win16", "False");
|
||||
defaultCaps.Add ("win32", "False");
|
||||
defaultCaps.Add ("win64", "False");
|
||||
}
|
||||
|
||||
|
||||
public static Hashtable GetCapabilities (string userAgent)
|
||||
{
|
||||
Init ();
|
||||
@@ -255,12 +270,7 @@ namespace System.Web
|
||||
foreach (BrowserData bd in alldata) {
|
||||
if (bd.IsMatch (userAgent)) {
|
||||
Hashtable tbl;
|
||||
#if NET_2_0
|
||||
tbl = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
|
||||
#else
|
||||
tbl = new Hashtable (CaseInsensitiveHashCodeProvider.DefaultInvariant,
|
||||
CaseInsensitiveComparer.DefaultInvariant);
|
||||
#endif
|
||||
tbl = new Hashtable (defaultCaps);
|
||||
userBrowserCaps = bd.GetProperties (tbl);
|
||||
break;
|
||||
}
|
||||
@@ -270,9 +280,8 @@ namespace System.Web
|
||||
userBrowserCaps = defaultCaps;
|
||||
|
||||
lock (typeof (CapabilitiesLoader)) {
|
||||
if (userAgentsCache.Count >= userAgentsCacheSize) {
|
||||
if (userAgentsCache.Count >= userAgentsCacheSize)
|
||||
userAgentsCache.Clear ();
|
||||
}
|
||||
}
|
||||
userAgentsCache [userAgent] = userBrowserCaps;
|
||||
}
|
||||
@@ -369,9 +378,8 @@ namespace System.Web
|
||||
allhash.Add (key, data);
|
||||
browserData.Add (data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
browserData.Reverse();
|
||||
alldata = browserData;
|
||||
foreach (BrowserData data in alldata) {
|
||||
string pname = data.GetParentName ();
|
||||
@@ -398,5 +406,3 @@ namespace System.Web
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,46 @@
|
||||
2007-07-05 Miguel de Icaza <[email protected]>
|
||||
|
||||
* HttpApplication.cs (AsyncRequestState.Complete): Add the
|
||||
try/catch for the callback here to ensure that we only call
|
||||
complete_event.Set once.
|
||||
|
||||
(PipelineDone): This is where the core of the bug fix is: do not
|
||||
call Complete() or call done.Set() (depending on the invocation
|
||||
case) until we are actually done cleaning up the request.
|
||||
|
||||
The problem was that we signaled that we were done, but we had not
|
||||
completed the shut down, so another thread could have been
|
||||
scheduled on the same HttpApplication and had its variables be
|
||||
modified as we completed the shutdown on the first thread.
|
||||
|
||||
This fixes #81400 which was a very long standing bug.
|
||||
|
||||
(Tick): Remove the pipeline check against null, this is not
|
||||
necessary and it will help us find problems like this one in the
|
||||
future.
|
||||
|
||||
Reverts patch r66072 which was a described as:
|
||||
|
||||
band-aid patch to help debugging hang running 2.0
|
||||
tests.
|
||||
|
||||
2007-04-24 Marek Habersack <[email protected]>
|
||||
|
||||
* CapabilitiesLoader.cs: Hashtables used as property containers
|
||||
should not be case-insensitive as we now preload the property
|
||||
hashes with default properties, to make the code work in case
|
||||
browscap.ini is broken or missing. Instead, the keys are
|
||||
lower-cased and trimmed before indexing the Hashtable.
|
||||
Added all the missing capabilities to the defaultCaps Hashtable.
|
||||
The returned Hashtable is not reversed in GetCapabilities anymore
|
||||
- it might make the code faster, but it also makes it mismatch
|
||||
browsers (e.g. Firefox 2.0 is mismatched for Mozilla 1.8).
|
||||
All of the above fixes bug #81437.
|
||||
|
||||
2007-04-22 Joshua Tauberer <[email protected]>
|
||||
|
||||
* HttpParamsCollection.cs: Fix IndexOutOfRangeException.
|
||||
|
||||
2007-04-17 Igor Zelmanovich <[email protected]>
|
||||
|
||||
* HttpException.cs: used GetBaseException() instead InnerException.
|
||||
|
||||
@@ -626,9 +626,6 @@ namespace System.Web {
|
||||
//
|
||||
void ProcessError (Exception e)
|
||||
{
|
||||
if (context == null)
|
||||
context = HttpContext.Current;
|
||||
|
||||
bool first = context.Error == null;
|
||||
context.AddError (e);
|
||||
if (first){
|
||||
@@ -652,8 +649,8 @@ namespace System.Web {
|
||||
void Tick ()
|
||||
{
|
||||
try {
|
||||
if (pipeline != null && pipeline.MoveNext ()){
|
||||
if (pipeline == null || (bool)pipeline.Current)
|
||||
if (pipeline.MoveNext ()){
|
||||
if ((bool)pipeline.Current)
|
||||
PipelineDone ();
|
||||
}
|
||||
} catch (ThreadAbortException taex) {
|
||||
@@ -842,8 +839,6 @@ namespace System.Web {
|
||||
} catch (Exception e) {
|
||||
Console.WriteLine ("Internal error: OutputPage threw an exception " + e);
|
||||
} finally {
|
||||
if (context == null)
|
||||
context = HttpContext.Current;
|
||||
context.WorkerRequest.EndOfRequest();
|
||||
if (factory != null && context.Handler != null){
|
||||
factory.ReleaseHandler (context.Handler);
|
||||
@@ -853,29 +848,18 @@ namespace System.Web {
|
||||
#if NET_2_0
|
||||
context.PopHandler ();
|
||||
#endif
|
||||
if (begin_iar != null){
|
||||
try {
|
||||
begin_iar.Complete ();
|
||||
} catch {
|
||||
//
|
||||
// TODO: if this throws an error, we have no way of reporting it
|
||||
// Not really too bad, since the only failure might be
|
||||
// `HttpRuntime.request_processed'
|
||||
//
|
||||
} finally {
|
||||
done.Set ();
|
||||
}
|
||||
} else {
|
||||
done.Set ();
|
||||
}
|
||||
|
||||
// context = null; -> moved to PostDone
|
||||
pipeline = null;
|
||||
current_ai = null;
|
||||
}
|
||||
PostDone ();
|
||||
}
|
||||
|
||||
if (begin_iar != null)
|
||||
begin_iar.Complete ();
|
||||
else
|
||||
done.Set ();
|
||||
}
|
||||
|
||||
//
|
||||
// Events fired as described in `Http Runtime Support, HttpModules,
|
||||
// Handling Public Events'
|
||||
@@ -1310,8 +1294,16 @@ namespace System.Web {
|
||||
internal void Complete ()
|
||||
{
|
||||
completed = true;
|
||||
if (cb != null)
|
||||
cb (this);
|
||||
try {
|
||||
//
|
||||
// TODO: if this throws an error, we have no way of reporting it
|
||||
// Not really too bad, since the only failure might be
|
||||
// `HttpRuntime.request_processed'.
|
||||
//
|
||||
if (cb != null)
|
||||
cb (this);
|
||||
} catch {
|
||||
}
|
||||
|
||||
complete_event.Set ();
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace System.Web
|
||||
if (values == null)
|
||||
return null;
|
||||
|
||||
if (values [0] == ',')
|
||||
if (values.Length > 0 && values [0] == ',')
|
||||
return values.Substring (1);
|
||||
|
||||
return values;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-25 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* XmlSchemas.cs : 1.1-only duplicate check does not seem to be
|
||||
required. This is also a workaround for 1.x ws proxy generation.
|
||||
|
||||
2007-04-19 Konstantin Triger <[email protected]>
|
||||
|
||||
* XmlSchemaExporter.cs: do not export twice simple types.
|
||||
|
||||
@@ -210,10 +210,6 @@ namespace System.Xml.Serialization
|
||||
{
|
||||
string ns = ((XmlSchema) value).TargetNamespace;
|
||||
if (ns == null) ns = "";
|
||||
#if ONLY_1_1
|
||||
if (table.Contains (ns))
|
||||
throw new InvalidOperationException ("A schema with the namespace '" + ns + "' has already been added.");
|
||||
#endif
|
||||
table [ns] = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,11 @@ using System.Globalization;
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public sealed class DefaultValueAttribute : Attribute
|
||||
public
|
||||
#if !NET_2_0
|
||||
sealed
|
||||
#endif
|
||||
class DefaultValueAttribute : Attribute
|
||||
{
|
||||
|
||||
private object DefaultValue;
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2007-05-07 Miguel de Icaza <[email protected]>
|
||||
|
||||
* WebHeaderCollection.cs: To be compatible with older versions of
|
||||
Mono that might have serialized this in a different format, catch
|
||||
the potential exception, and try the old name.
|
||||
|
||||
This should become a practice whenever we fix serialization in the
|
||||
future.
|
||||
|
||||
2007-04-17 Joel Reed <[email protected]>
|
||||
|
||||
* WebHeaderCollection.cs: www-authenticate should be multivalue.
|
||||
|
||||
@@ -113,10 +113,20 @@ namespace System.Net
|
||||
protected WebHeaderCollection (SerializationInfo serializationInfo,
|
||||
StreamingContext streamingContext)
|
||||
{
|
||||
int count = serializationInfo.GetInt32("Count");
|
||||
for (int i = 0; i < count; i++)
|
||||
this.Add (serializationInfo.GetString (i.ToString ()),
|
||||
serializationInfo.GetString ((count + i).ToString ()));
|
||||
int count;
|
||||
|
||||
try {
|
||||
count = serializationInfo.GetInt32("Count");
|
||||
for (int i = 0; i < count; i++)
|
||||
this.Add (serializationInfo.GetString (i.ToString ()),
|
||||
serializationInfo.GetString ((count + i).ToString ()));
|
||||
} catch (SerializationException){
|
||||
count = serializationInfo.GetInt32("count");
|
||||
for (int i = 0; i < count; i++)
|
||||
this.Add (serializationInfo.GetString ("k" + i),
|
||||
serializationInfo.GetString ("v" + i));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal WebHeaderCollection (bool internallyCreated)
|
||||
|
||||
@@ -138,6 +138,14 @@ namespace System.IO {
|
||||
}
|
||||
}
|
||||
|
||||
public void InternalWriteChars (char [] buffer, int n)
|
||||
{
|
||||
try {
|
||||
base.Write (buffer, 0, n);
|
||||
} catch (IOException) {
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write (char [] val)
|
||||
{
|
||||
Write (val, 0, val.Length);
|
||||
|
||||
@@ -1,3 +1,68 @@
|
||||
2007-05-11 Jeffrey Stedfast <[email protected]>
|
||||
|
||||
Fixes bug #81540
|
||||
|
||||
* TermInfoDriver.cs (WriteSpecialKey): Actually clear the screen
|
||||
and reset the cursor position to 0,0 when the key is
|
||||
ConsoleKey.Clear.
|
||||
(Clear): Reset the cursor position to 0,0
|
||||
|
||||
2007-04-24 Jeffrey Stedfast <[email protected]>
|
||||
|
||||
Fixes the last of the bugs listed in bug #77525
|
||||
|
||||
* TermInfoDriver.cs (ctor): For known terminal types, set color16
|
||||
to true (since we know they support 16 colours).
|
||||
(Init): set the setlfgcolor and setlbgcolor format strings.
|
||||
(BackgroundColor): Use the appropriate formatter string for
|
||||
setting the bgcolor.
|
||||
(ForegroundColor): Use the appropriate formatter string for
|
||||
setting the fgcolor.
|
||||
(TranslateColor): Now takes (and sets appropriately) an output
|
||||
'bool light' argument.
|
||||
|
||||
2007-04-23 Jeffrey Stedfast <[email protected]>
|
||||
|
||||
* TermInfoDriver.cs (ReadKeyInternal): Since our input stream is
|
||||
buffered, check if it has more buffered input in addition to our
|
||||
timeout check. This makes it such that we will actually correctly
|
||||
match multi-char escape sequences.
|
||||
(Read): Changed the logic slightly wrt 'fresh' echoing. Once we
|
||||
encounter a fresh char, all chars afterward should also be
|
||||
considered 'fresh' even if 'fresh' is returned as false later.
|
||||
(ReadLine): Same logic here.
|
||||
|
||||
2007-04-23 Jeffrey Stedfast <[email protected]>
|
||||
|
||||
Fixes bug #80702 (via getting rid of the casting) and more.
|
||||
|
||||
The following change makes it such that even if an application
|
||||
calls Console.SetOut() with its own output stream, we can still
|
||||
properly echo user-input from stdin to the real stdout.
|
||||
|
||||
* TermInfoDriver.cs (ctor): Grab a reference to the original
|
||||
Console.stdout so we can be sure we always echo to console.
|
||||
(QueueEcho): No need to cast Console.stdout anymore.
|
||||
(EchoFlush): Same.
|
||||
(WriteConsole: Here too.
|
||||
|
||||
2007-04-20 Jeffrey Stedfast <[email protected]>
|
||||
|
||||
* TermInfoDriver.cs (QueueEcho): Renamed from Echo(char). Use
|
||||
CStreamWriter's new InternalWriteChars().
|
||||
(Echo): Since we can no longer go thru CStreamWriter's ::Write()
|
||||
method that does checks for special keys, do the checks here
|
||||
instead - if it is a special key, flush the echo buffer and then
|
||||
write the special key.
|
||||
(EchoFlush): Also updated to use CStreamWriter's new
|
||||
InternalWriteChars().
|
||||
(Read): Use the Echo(key) variety.
|
||||
(ReadKey): Same.
|
||||
(ReadLine): And here too.
|
||||
|
||||
* CStreamWriter.cs (InternalWriteChars): Write a char array
|
||||
directly to stdout. Do not pass Go, do not collect $200.
|
||||
|
||||
2007-04-19 Jeffrey Stedfast <[email protected]>
|
||||
|
||||
Optimization for echoing keypresses back to the console when the
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace System {
|
||||
string bell;
|
||||
string term;
|
||||
StreamReader stdin;
|
||||
CStreamWriter stdout;
|
||||
internal byte verase;
|
||||
byte vsusp;
|
||||
byte intr;
|
||||
@@ -75,8 +76,11 @@ namespace System {
|
||||
string cursorAddress;
|
||||
ConsoleColor fgcolor = ConsoleColor.White;
|
||||
ConsoleColor bgcolor = ConsoleColor.Black;
|
||||
string setafcolor; // TODO: use setforeground/setbackground if available for better
|
||||
string setabcolor; // color mapping.
|
||||
bool color16 = false; // terminal supports 16 colors
|
||||
string setlfgcolor;
|
||||
string setlbgcolor;
|
||||
string setfgcolor;
|
||||
string setbgcolor;
|
||||
bool noGetPosition;
|
||||
Hashtable keymap;
|
||||
ByteMatcher rootmap;
|
||||
@@ -113,12 +117,12 @@ namespace System {
|
||||
return null;
|
||||
}
|
||||
|
||||
static void WriteConsole (string str)
|
||||
void WriteConsole (string str)
|
||||
{
|
||||
if (str == null)
|
||||
return;
|
||||
|
||||
((CStreamWriter) Console.stdout).InternalWriteString (str);
|
||||
|
||||
stdout.InternalWriteString (str);
|
||||
}
|
||||
|
||||
public TermInfoDriver ()
|
||||
@@ -136,8 +140,10 @@ namespace System {
|
||||
|
||||
if (term == "xterm") {
|
||||
reader = new TermInfoReader (term, KnownTerminals.xterm);
|
||||
color16 = true;
|
||||
} else if (term == "linux") {
|
||||
reader = new TermInfoReader (term, KnownTerminals.linux);
|
||||
color16 = true;
|
||||
} else {
|
||||
string filename = SearchTerminfo (term);
|
||||
if (filename != null)
|
||||
@@ -146,6 +152,14 @@ namespace System {
|
||||
|
||||
if (reader == null)
|
||||
reader = new TermInfoReader (term, KnownTerminals.ansi);
|
||||
|
||||
if (!(Console.stdout is CStreamWriter)) {
|
||||
// Application set its own stdout, we need a reference to the real stdout
|
||||
stdout = new CStreamWriter (Console.OpenStandardOutput (0), Console.OutputEncoding);
|
||||
((StreamWriter) stdout).AutoFlush = true;
|
||||
} else {
|
||||
stdout = (CStreamWriter) Console.stdout;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Initialized {
|
||||
@@ -156,7 +170,7 @@ namespace System {
|
||||
{
|
||||
if (inited)
|
||||
return;
|
||||
|
||||
|
||||
/* This should not happen any more, since it is checked for in Console */
|
||||
if (!ConsoleDriver.IsConsole)
|
||||
throw new IOException ("Not a tty.");
|
||||
@@ -176,8 +190,12 @@ namespace System {
|
||||
|
||||
origPair = reader.Get (TermInfoStrings.OrigPair);
|
||||
origColors = reader.Get (TermInfoStrings.OrigColors);
|
||||
setafcolor = MangleParameters (reader.Get (TermInfoStrings.SetAForeground));
|
||||
setabcolor = MangleParameters (reader.Get (TermInfoStrings.SetABackground));
|
||||
setfgcolor = MangleParameters (reader.Get (TermInfoStrings.SetAForeground));
|
||||
setbgcolor = MangleParameters (reader.Get (TermInfoStrings.SetABackground));
|
||||
// lighter fg colours are 90 -> 97 rather than 30 -> 37
|
||||
setlfgcolor = color16 ? setfgcolor.Replace ("[3", "[9") : setfgcolor;
|
||||
// lighter bg colours are 100 -> 107 rather than 40 -> 47
|
||||
setlbgcolor = color16 ? setbgcolor.Replace ("[4", "[10") : setbgcolor;
|
||||
string resetColors = (origColors == null) ? origPair : origColors;
|
||||
if (resetColors != null)
|
||||
endString += resetColors;
|
||||
@@ -237,35 +255,63 @@ namespace System {
|
||||
return str.Replace ("%p2%d", "{1}");
|
||||
}
|
||||
|
||||
static int TranslateColor (ConsoleColor desired)
|
||||
static int TranslateColor (ConsoleColor desired, out bool light)
|
||||
{
|
||||
switch (desired) {
|
||||
// Dark colours
|
||||
case ConsoleColor.Black:
|
||||
case ConsoleColor.DarkGray:
|
||||
light = false;
|
||||
return 0;
|
||||
case ConsoleColor.DarkBlue:
|
||||
case ConsoleColor.Blue:
|
||||
return 4;
|
||||
case ConsoleColor.DarkGreen:
|
||||
case ConsoleColor.Green:
|
||||
return 2;
|
||||
case ConsoleColor.DarkCyan:
|
||||
case ConsoleColor.Cyan:
|
||||
return 6;
|
||||
case ConsoleColor.DarkRed:
|
||||
case ConsoleColor.Red:
|
||||
light = false;
|
||||
return 1;
|
||||
case ConsoleColor.DarkMagenta:
|
||||
case ConsoleColor.Magenta:
|
||||
return 5;
|
||||
case ConsoleColor.DarkGreen:
|
||||
light = false;
|
||||
return 2;
|
||||
case ConsoleColor.DarkYellow:
|
||||
case ConsoleColor.Yellow:
|
||||
light = false;
|
||||
return 3;
|
||||
case ConsoleColor.DarkBlue:
|
||||
light = false;
|
||||
return 4;
|
||||
case ConsoleColor.DarkMagenta:
|
||||
light = false;
|
||||
return 5;
|
||||
case ConsoleColor.DarkCyan:
|
||||
light = false;
|
||||
return 6;
|
||||
case ConsoleColor.Gray:
|
||||
light = false;
|
||||
return 7;
|
||||
// Light colours
|
||||
case ConsoleColor.DarkGray:
|
||||
light = true;
|
||||
return 0;
|
||||
case ConsoleColor.Red:
|
||||
light = true;
|
||||
return 1;
|
||||
case ConsoleColor.Green:
|
||||
light = true;
|
||||
return 2;
|
||||
case ConsoleColor.Yellow:
|
||||
light = true;
|
||||
return 3;
|
||||
case ConsoleColor.Blue:
|
||||
light = true;
|
||||
return 4;
|
||||
case ConsoleColor.Magenta:
|
||||
light = true;
|
||||
return 5;
|
||||
case ConsoleColor.Cyan:
|
||||
light = true;
|
||||
return 6;
|
||||
case ConsoleColor.White:
|
||||
light = true;
|
||||
return 7;
|
||||
}
|
||||
|
||||
light = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -307,6 +353,9 @@ namespace System {
|
||||
IncrementX ();
|
||||
break;
|
||||
case ConsoleKey.Clear:
|
||||
WriteConsole (clear);
|
||||
cursorLeft = 0;
|
||||
cursorTop = 0;
|
||||
break;
|
||||
case ConsoleKey.Enter:
|
||||
break;
|
||||
@@ -371,7 +420,14 @@ namespace System {
|
||||
}
|
||||
|
||||
bgcolor = value;
|
||||
WriteConsole (String.Format (setabcolor, TranslateColor (value)));
|
||||
|
||||
bool light;
|
||||
int colour = TranslateColor (value, out light);
|
||||
|
||||
if (light)
|
||||
WriteConsole (String.Format (setlbgcolor, colour));
|
||||
else
|
||||
WriteConsole (String.Format (setbgcolor, colour));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +445,14 @@ namespace System {
|
||||
}
|
||||
|
||||
fgcolor = value;
|
||||
WriteConsole (String.Format (setafcolor, TranslateColor (value)));
|
||||
|
||||
bool light;
|
||||
int colour = TranslateColor (value, out light);
|
||||
|
||||
if (light)
|
||||
WriteConsole (String.Format (setlfgcolor, colour));
|
||||
else
|
||||
WriteConsole (String.Format (setfgcolor, colour));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,6 +803,8 @@ namespace System {
|
||||
}
|
||||
|
||||
WriteConsole (clear);
|
||||
cursorLeft = 0;
|
||||
cursorTop = 0;
|
||||
}
|
||||
|
||||
public void Beep (int frequency, int duration)
|
||||
@@ -858,7 +923,11 @@ namespace System {
|
||||
do {
|
||||
AddToBuffer (stdin.Read ());
|
||||
} while (ConsoleDriver.InternalKeyAvailable (0) > 0);
|
||||
} else {
|
||||
} else if (stdin.Peek () != -1) {
|
||||
do {
|
||||
AddToBuffer (stdin.Read ());
|
||||
} while (stdin.Peek () != -1);
|
||||
} else {
|
||||
if ((o = GetKeyFromBuffer (false)) != null)
|
||||
break;
|
||||
|
||||
@@ -889,7 +958,7 @@ namespace System {
|
||||
int echon = 0;
|
||||
|
||||
// Queues a character to be echo'd back to the console
|
||||
void Echo (char c)
|
||||
void QueueEcho (char c)
|
||||
{
|
||||
if (echobuf == null)
|
||||
echobuf = new char [1024];
|
||||
@@ -898,7 +967,7 @@ namespace System {
|
||||
|
||||
if (echon == echobuf.Length || !InputPending ()) {
|
||||
// blit our echo buffer to the console
|
||||
Console.Write (echobuf, 0, echon);
|
||||
stdout.InternalWriteChars (echobuf, echon);
|
||||
echon = 0;
|
||||
}
|
||||
}
|
||||
@@ -906,7 +975,15 @@ namespace System {
|
||||
// Queues a key to be echo'd back to the console
|
||||
void Echo (ConsoleKeyInfo key)
|
||||
{
|
||||
Echo (key.KeyChar);
|
||||
if (!IsSpecialKey (key)) {
|
||||
QueueEcho (key.KeyChar);
|
||||
return;
|
||||
}
|
||||
|
||||
// flush pending echo's
|
||||
EchoFlush ();
|
||||
|
||||
WriteSpecialKey (key);
|
||||
}
|
||||
|
||||
// Flush the pending echo queue
|
||||
@@ -916,17 +993,17 @@ namespace System {
|
||||
return;
|
||||
|
||||
// flush our echo buffer to the console
|
||||
Console.Write (echobuf, 0, echon);
|
||||
stdout.InternalWriteChars (echobuf, echon);
|
||||
echon = 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public int Read ([In, Out] char [] dest, int index, int count)
|
||||
{
|
||||
bool fresh, echo = false;
|
||||
StringBuilder sbuf;
|
||||
ConsoleKeyInfo key;
|
||||
int BoL = 0; // Beginning-of-Line marker (can't backspace beyond this)
|
||||
bool fresh;
|
||||
object o;
|
||||
char c;
|
||||
|
||||
@@ -956,6 +1033,7 @@ namespace System {
|
||||
|
||||
do {
|
||||
key = ReadKeyInternal (out fresh);
|
||||
echo = echo || fresh;
|
||||
c = key.KeyChar;
|
||||
|
||||
if (key.Key != ConsoleKey.Backspace) {
|
||||
@@ -970,8 +1048,8 @@ namespace System {
|
||||
}
|
||||
|
||||
// echo fresh keys back to the console
|
||||
if (fresh)
|
||||
Echo (c);
|
||||
if (echo)
|
||||
Echo (key);
|
||||
} while (key.Key != ConsoleKey.Enter);
|
||||
|
||||
EchoFlush ();
|
||||
@@ -1002,7 +1080,7 @@ namespace System {
|
||||
|
||||
if (!intercept && fresh) {
|
||||
// echo the fresh key back to the console
|
||||
Echo (key.KeyChar);
|
||||
Echo (key);
|
||||
EchoFlush ();
|
||||
}
|
||||
|
||||
@@ -1020,8 +1098,8 @@ namespace System {
|
||||
GetCursorPosition ();
|
||||
|
||||
StringBuilder builder = new StringBuilder ();
|
||||
bool fresh, echo = false;
|
||||
ConsoleKeyInfo key;
|
||||
bool fresh;
|
||||
char c;
|
||||
|
||||
rl_startx = cursorLeft;
|
||||
@@ -1029,21 +1107,23 @@ namespace System {
|
||||
|
||||
do {
|
||||
key = ReadKeyInternal (out fresh);
|
||||
echo = echo || fresh;
|
||||
c = key.KeyChar;
|
||||
|
||||
if (key.Key != ConsoleKey.Enter) {
|
||||
if (key.Key != ConsoleKey.Backspace)
|
||||
if (key.Key != ConsoleKey.Backspace) {
|
||||
builder.Append (c);
|
||||
else if (builder.Length > 0)
|
||||
} else if (builder.Length > 0) {
|
||||
builder.Length--;
|
||||
else {
|
||||
} else {
|
||||
// skips over echoing the key to the console
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// echo fresh keys back to the console
|
||||
if (fresh)
|
||||
Echo (c);
|
||||
if (echo)
|
||||
Echo (key);
|
||||
} while (key.Key != ConsoleKey.Enter);
|
||||
|
||||
EchoFlush ();
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-23 Marek Safar <[email protected]>
|
||||
|
||||
A fix for bug #81414
|
||||
* delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
|
||||
|
||||
2007-04-19 Martin Baulig <[email protected]>
|
||||
|
||||
* convert.cs
|
||||
|
||||
+3
-1
@@ -265,7 +265,6 @@ namespace Mono.CSharp {
|
||||
mattr, cc, TypeManager.iasyncresult_type, async_parameters.Types);
|
||||
|
||||
BeginInvokeBuilder.SetImplementationFlags (MethodImplAttributes.Runtime);
|
||||
async_parameters.ApplyAttributes (BeginInvokeBuilder);
|
||||
TypeManager.RegisterMethod (BeginInvokeBuilder, async_parameters);
|
||||
|
||||
//
|
||||
@@ -323,6 +322,9 @@ namespace Mono.CSharp {
|
||||
{
|
||||
Parameters.ApplyAttributes (InvokeBuilder);
|
||||
|
||||
Parameters p = (Parameters)TypeManager.GetParameterData (BeginInvokeBuilder);
|
||||
p.ApplyAttributes (BeginInvokeBuilder);
|
||||
|
||||
if (OptAttributes != null) {
|
||||
OptAttributes.Emit ();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2007-04-23 Zoltan Varga <[email protected]>
|
||||
|
||||
* alpha/alpha-codegen.h: More alpha port work from
|
||||
Sergey Tikhonov <[email protected]>.
|
||||
|
||||
Mon Mar 12 17:07:32 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
|
||||
@@ -547,6 +547,10 @@ typedef enum {
|
||||
#define alpha_cmptlt(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x0A6, Rsrc1, Rsrc2, Rdest )
|
||||
#define alpha_cmptle(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x0A7, Rsrc1, Rsrc2, Rdest )
|
||||
|
||||
#define alpha_addt_su(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x5A0, Rsrc1, Rsrc2, Rdest )
|
||||
#define alpha_subt_su(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x5A1, Rsrc1, Rsrc2, Rdest )
|
||||
|
||||
|
||||
#define alpha_cmptun_su(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x5A4, Rsrc1, Rsrc2, Rdest )
|
||||
#define alpha_cmpteq_su(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x5A5, Rsrc1, Rsrc2, Rdest )
|
||||
#define alpha_cmptlt_su(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x5A6, Rsrc1, Rsrc2, Rdest )
|
||||
@@ -557,6 +561,9 @@ typedef enum {
|
||||
#define alpha_cvtqs(ins, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x0BC, alpha_fzero, Rsrc2, Rdest )
|
||||
#define alpha_cvtqt(ins, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x0BE, alpha_fzero, Rsrc2, Rdest )
|
||||
|
||||
#define alpha_divt_su(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x5A3, Rsrc1, Rsrc2, Rdest )
|
||||
|
||||
#define alpha_cvtts_su(ins, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x16, 0x5AC, alpha_fzero, Rsrc2, Rdest )
|
||||
|
||||
#define alpha_cpys(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x17, 0x020, Rsrc1, Rsrc2, Rdest )
|
||||
#define alpha_cpysn(ins, Rsrc1, Rsrc2, Rdest) alpha_encode_fpop( ins, 0x17, 0x021, Rsrc1, Rsrc2, Rdest )
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2007-04-26 Dick Porter <[email protected]>
|
||||
|
||||
* shared.c (_wapi_shm_semaphores_init): Need to check
|
||||
MONO_DISABLE_SHM in this entry point, as it's called before
|
||||
_wapi_shm_attach(). Fixes bug 81436.
|
||||
|
||||
|
||||
2007-04-13 Dick Porter <[email protected]>
|
||||
|
||||
* shared.h:
|
||||
|
||||
+15
-7
@@ -220,6 +220,18 @@ try_again:
|
||||
return(fd);
|
||||
}
|
||||
|
||||
static gboolean check_disabled (void)
|
||||
{
|
||||
if (_wapi_shm_disabled || g_getenv ("MONO_DISABLE_SHM")) {
|
||||
const char* val = g_getenv ("MONO_DISABLE_SHM");
|
||||
if (val == NULL || *val == '1' || *val == 'y' || *val == 'Y') {
|
||||
_wapi_shm_disabled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return(_wapi_shm_disabled);
|
||||
}
|
||||
|
||||
/*
|
||||
* _wapi_shm_attach:
|
||||
* @success: Was it a success
|
||||
@@ -248,12 +260,8 @@ gpointer _wapi_shm_attach (_wapi_shm_t type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (_wapi_shm_disabled || g_getenv ("MONO_DISABLE_SHM")) {
|
||||
const char* val = g_getenv ("MONO_DISABLE_SHM");
|
||||
if (val == NULL || *val == '1' || *val == 'y' || *val == 'Y') {
|
||||
_wapi_shm_disabled = TRUE;
|
||||
return g_malloc0 (size);
|
||||
}
|
||||
if (check_disabled ()) {
|
||||
return g_malloc0 (size);
|
||||
}
|
||||
|
||||
fd = _wapi_shm_file_open (filename, size);
|
||||
@@ -676,7 +684,7 @@ static int noshm_sem_unlock (int sem)
|
||||
|
||||
void _wapi_shm_semaphores_init (void)
|
||||
{
|
||||
if (_wapi_shm_disabled) {
|
||||
if (check_disabled ()) {
|
||||
noshm_semaphores_init ();
|
||||
} else {
|
||||
shm_semaphores_init ();
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
2007-04-28 Zoltan Varga <[email protected]>
|
||||
|
||||
* threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
|
||||
caller holds threads_lock, leading to deadlocks. Fixes #81476.
|
||||
|
||||
2007-04-23 Jonathan Chambers <[email protected]>
|
||||
|
||||
* marshal.c: Fix calling convention for CCW on non-windows
|
||||
platforms. STDCALL on windows, CDECL everywhere else to work
|
||||
with XPCOM and MainWin COM.
|
||||
|
||||
Code is contributed under MIT/X11 license.
|
||||
|
||||
2007-04-23 Martin Baulig <[email protected]>
|
||||
|
||||
Fix #80969.
|
||||
|
||||
* loader.c
|
||||
(method_from_memberref): Added `gboolean *used_context' argument.
|
||||
(mono_get_method_from_token): Likewise.
|
||||
(mono_get_method_full): Don't insert the method in the cache when
|
||||
`used_context' is true.
|
||||
|
||||
|
||||
Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
|
||||
@@ -427,7 +427,7 @@ struct _MonoGenericContainer {
|
||||
MonoClass *klass;
|
||||
MonoMethod *method;
|
||||
} owner;
|
||||
int type_argc : 6;
|
||||
int type_argc : 31;
|
||||
/* If true, we're a generic method, otherwise a generic type definition. */
|
||||
/* Invariant: parent != NULL => is_method */
|
||||
int is_method : 1;
|
||||
|
||||
@@ -2678,7 +2678,7 @@ ves_icall_InternalInvoke (MonoReflectionMethod *method, MonoObject *this, MonoAr
|
||||
if (pcount != mono_method_signature (m)->param_count)
|
||||
mono_raise_exception (mono_exception_from_name (mono_defaults.corlib, "System.Reflection", "TargetParameterCountException"));
|
||||
|
||||
if ((m->klass->flags & TYPE_ATTRIBUTE_ABSTRACT) && !strcmp (m->name, ".ctor"))
|
||||
if ((m->klass->flags & TYPE_ATTRIBUTE_ABSTRACT) && !strcmp (m->name, ".ctor") && !this)
|
||||
mono_raise_exception (mono_exception_from_name_msg (mono_defaults.corlib, "System", "MethodAccessException", "Cannot invoke constructor of an abstract class."));
|
||||
|
||||
if (m->klass->image->assembly->ref_only)
|
||||
|
||||
+33
-10
@@ -679,7 +679,8 @@ search_in_array_class (MonoClass *klass, const char *name, MonoMethodSignature *
|
||||
}
|
||||
|
||||
static MonoMethod *
|
||||
method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typespec_context)
|
||||
method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typespec_context,
|
||||
gboolean *used_context)
|
||||
{
|
||||
MonoClass *klass = NULL;
|
||||
MonoMethod *method = NULL;
|
||||
@@ -698,6 +699,14 @@ method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typesp
|
||||
|
||||
mname = mono_metadata_string_heap (image, cols [MONO_MEMBERREF_NAME]);
|
||||
|
||||
/*
|
||||
* Whether we actually used the `typespec_context' or not.
|
||||
* This is used to tell our caller whether or not it's safe to insert the returned
|
||||
* method into a cache.
|
||||
*/
|
||||
if (used_context)
|
||||
*used_context = class == MONO_MEMBERREF_PARENT_TYPESPEC;
|
||||
|
||||
switch (class) {
|
||||
case MONO_MEMBERREF_PARENT_TYPEREF:
|
||||
klass = mono_class_from_typeref (image, MONO_TOKEN_TYPE_REF | nindex);
|
||||
@@ -859,7 +868,7 @@ method_from_methodspec (MonoImage *image, MonoGenericContext *context, guint32 i
|
||||
if ((token & MONO_METHODDEFORREF_MASK) == MONO_METHODDEFORREF_METHODDEF)
|
||||
method = mono_get_method_full (image, MONO_TOKEN_METHOD_DEF | nindex, NULL, context);
|
||||
else
|
||||
method = method_from_memberref (image, nindex, context);
|
||||
method = method_from_memberref (image, nindex, context, NULL);
|
||||
|
||||
method = mono_get_inflated_method (method);
|
||||
|
||||
@@ -1318,7 +1327,7 @@ mono_get_shared_generic_method (MonoGenericContainer *container)
|
||||
|
||||
static MonoMethod *
|
||||
mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
|
||||
MonoGenericContext *context)
|
||||
MonoGenericContext *context, gboolean *used_context)
|
||||
{
|
||||
MonoMethod *result;
|
||||
int table = mono_metadata_token_table (token);
|
||||
@@ -1333,16 +1342,18 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
|
||||
return mono_lookup_dynamic_token (image, token);
|
||||
|
||||
if (table != MONO_TABLE_METHOD) {
|
||||
if (table == MONO_TABLE_METHODSPEC)
|
||||
if (table == MONO_TABLE_METHODSPEC) {
|
||||
if (used_context) *used_context = TRUE;
|
||||
return method_from_methodspec (image, context, idx);
|
||||
}
|
||||
if (table != MONO_TABLE_MEMBERREF)
|
||||
g_print("got wrong token: 0x%08x\n", token);
|
||||
g_assert (table == MONO_TABLE_MEMBERREF);
|
||||
result = method_from_memberref (image, idx, context);
|
||||
|
||||
return result;
|
||||
return method_from_memberref (image, idx, context, used_context);
|
||||
}
|
||||
|
||||
if (used_context) *used_context = FALSE;
|
||||
|
||||
mono_metadata_decode_row (&image->tables [MONO_TABLE_METHOD], idx - 1, cols, 6);
|
||||
|
||||
if ((cols [2] & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
|
||||
@@ -1386,6 +1397,7 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
|
||||
container = generic_container;
|
||||
}
|
||||
|
||||
|
||||
if (!sig) /* already taken from the methodref */
|
||||
sig = mono_metadata_blob_heap (image, cols [4]);
|
||||
size = mono_metadata_decode_blob_size (sig, &sig);
|
||||
@@ -1426,6 +1438,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
|
||||
MonoGenericContext *context)
|
||||
{
|
||||
MonoMethod *result;
|
||||
gboolean used_context = FALSE;
|
||||
|
||||
/* We do everything inside the lock to prevent creation races */
|
||||
|
||||
@@ -1436,11 +1449,21 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
|
||||
return result;
|
||||
}
|
||||
|
||||
result = mono_get_method_from_token (image, token, klass, context);
|
||||
result = mono_get_method_from_token (image, token, klass, context, &used_context);
|
||||
|
||||
//printf ("GET: %s\n", mono_method_full_name (result, TRUE));
|
||||
|
||||
if (!(result && result->is_inflated))
|
||||
#if 0
|
||||
g_message (G_STRLOC ": %s - %d - %d", mono_method_full_name (result, TRUE),
|
||||
result->is_inflated, used_context);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* `used_context' specifies whether or not mono_get_method_from_token() actually
|
||||
* used the `context' to get the method. See bug #80969.
|
||||
*/
|
||||
|
||||
if (!used_context && !(result && result->is_inflated))
|
||||
g_hash_table_insert (image->method_cache, GINT_TO_POINTER (token), result);
|
||||
|
||||
mono_loader_unlock ();
|
||||
@@ -1468,7 +1491,7 @@ mono_get_method_constrained (MonoImage *image, guint32 token, MonoClass *constra
|
||||
|
||||
mono_loader_lock ();
|
||||
|
||||
*cil_method = mono_get_method_from_token (image, token, NULL, context);
|
||||
*cil_method = mono_get_method_from_token (image, token, NULL, context, NULL);
|
||||
if (!*cil_method) {
|
||||
mono_loader_unlock ();
|
||||
return NULL;
|
||||
|
||||
@@ -11252,7 +11252,13 @@ cominterop_setup_marshal_context (EmitMarshalContext *m, MonoMethod *method)
|
||||
/* FIXME: which to use? */
|
||||
csig = signature_dup (method->klass->image, sig);
|
||||
/* csig = mono_metadata_signature_dup (sig); */
|
||||
|
||||
/* STDCALL on windows, CDECL everywhere else to work with XPCOM and MainWin COM */
|
||||
#ifdef PLATFORM_WIN32
|
||||
csig->call_convention = MONO_CALL_STDCALL;
|
||||
#else
|
||||
csig->call_convention = MONO_CALL_C;
|
||||
#endif
|
||||
csig->hasthis = 0;
|
||||
csig->pinvoke = 1;
|
||||
|
||||
|
||||
@@ -2034,13 +2034,11 @@ static void build_wait_tids (gpointer key, gpointer value, gpointer user)
|
||||
MonoThread *thread=(MonoThread *)value;
|
||||
|
||||
/* Ignore background threads, we abort them later */
|
||||
mono_monitor_enter (thread->synch_lock);
|
||||
/* Do not lock here since it is not needed and the caller holds threads_lock */
|
||||
if (thread->state & ThreadState_Background) {
|
||||
THREAD_DEBUG (g_message ("%s: ignoring background thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
|
||||
mono_monitor_exit (thread->synch_lock);
|
||||
return; /* just leave, ignore */
|
||||
}
|
||||
mono_monitor_exit (thread->synch_lock);
|
||||
|
||||
if (mono_gc_is_finalizer_thread (thread)) {
|
||||
THREAD_DEBUG (g_message ("%s: ignoring finalizer thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-23 Zoltan Varga <[email protected]>
|
||||
|
||||
* mini-alpha.c cpu-alpha.md: More alpha port work from
|
||||
Sergey Tikhonov <[email protected]>.
|
||||
|
||||
2007-04-19 Zoltan Varga <[email protected]>
|
||||
|
||||
* cpu-s390.md (break): Correct the length of break instruction.
|
||||
|
||||
@@ -113,7 +113,7 @@ op_rethrow: src1:i len:20
|
||||
conv.ovf.i4.un: dest:i src1:i len:16
|
||||
conv.ovf.u4.un:
|
||||
conv.ovf.u4: dest:i src1:i len:15
|
||||
ckfinite: dest:f src1:f len:43
|
||||
ckfinite: dest:f src1:f len:44
|
||||
conv.u2: dest:i src1:i len:4
|
||||
conv.u1: dest:i src1:i len:4
|
||||
conv.i: dest:i src1:i len:4
|
||||
|
||||
+33
-4
@@ -3945,11 +3945,40 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
|
||||
|
||||
case CEE_CKFINITE:
|
||||
// Float register contains a value which we need to check
|
||||
CFG_DEBUG(4) g_print("ALPHA_TODO: [chfinite] sreg1=%d\n", ins->sreg1);
|
||||
alpha_cmptun_su(code, ins->sreg1, ins->sreg1, alpha_at);
|
||||
alpha_trapb(code);
|
||||
EMIT_COND_EXC_BRANCH(fbeq, alpha_at, "ArithmeticException");
|
||||
{
|
||||
double ni = -1.0 / 0.0;
|
||||
double pi = 1.0 / 0.0;
|
||||
AlphaGotData ge_data;
|
||||
|
||||
CFG_DEBUG(4) g_print("ALPHA_TODO: [chfinite] sreg1=%d\n", ins->sreg1);
|
||||
alpha_cmptun_su(code, ins->sreg1, ins->sreg1, alpha_at);
|
||||
alpha_trapb(code);
|
||||
EMIT_COND_EXC_BRANCH(fbne, alpha_at, "ArithmeticException");
|
||||
|
||||
// Negative infinity
|
||||
ge_data.data.d = ni;
|
||||
add_got_entry(cfg, GT_DOUBLE, ge_data,
|
||||
(char *)code - (char *)cfg->native_code,
|
||||
MONO_PATCH_INFO_NONE, 0);
|
||||
alpha_ldt(code, alpha_at, alpha_gp, 0);
|
||||
|
||||
alpha_cmpteq_su(code, ins->sreg1, alpha_at, alpha_at);
|
||||
alpha_trapb(code);
|
||||
|
||||
EMIT_COND_EXC_BRANCH(fbne, alpha_at, "ArithmeticException");
|
||||
|
||||
// Positive infinity
|
||||
ge_data.data.d = pi;
|
||||
add_got_entry(cfg, GT_DOUBLE, ge_data,
|
||||
(char *)code - (char *)cfg->native_code,
|
||||
MONO_PATCH_INFO_NONE, 0);
|
||||
alpha_ldt(code, alpha_at, alpha_gp, 0);
|
||||
|
||||
alpha_cmpteq_su(code, ins->sreg1, alpha_at, alpha_at);
|
||||
alpha_trapb(code);
|
||||
|
||||
EMIT_COND_EXC_BRANCH(fbne, alpha_at, "ArithmeticException");
|
||||
}
|
||||
break;
|
||||
case OP_FDIV:
|
||||
CFG_DEBUG(4) g_print("ALPHA_TODO: [fdiv] dest=%d, sreg1=%d, sreg2=%d\n",
|
||||
|
||||
Reference in new issue
Block a user