[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-patches
Subject: [Mono-patches] [mono/mono] [3 commits] f53dd8b2: Fix few excessive
From: "Marek Safar (marek.safar () gmail ! com)" <mono-patches () lists ! ximian ! com>
Date: 2011-03-31 14:22:52
Message-ID: 20110331142252.1DF862212B () mono ! ximian ! com
[Download RAW message or body]
Branch: refs/heads/master
Home: https://github.com/mono/mono
Commit: f53dd8b2649dd2b1c1ee6297d6c48a307b84b16e
Author: Marek Safar <marek.safar@gmail.com>
Date: 03/31/2011 09:58:54
URL: https://github.com/mono/mono/commit/f53dd8b2649dd2b1c1ee6297d6c48a307b84b16e
Fix few excessive error reports
Changed paths:
M mcs/mcs/anonymous.cs
M mcs/mcs/assembly.cs
M mcs/mcs/attribute.cs
M mcs/mcs/ecore.cs
M mcs/mcs/expression.cs
M mcs/mcs/parameter.cs
M mcs/mcs/property.cs
M mcs/mcs/statement.cs
Added paths:
A mcs/tests/test-818.cs
Modified: mcs/mcs/anonymous.cs
===================================================================
--- a/mcs/mcs/anonymous.cs
+++ b/mcs/mcs/anonymous.cs
@@ -1657,15 +1657,6 @@ namespace Mono.CSharp {
//
public class AnonymousTypeClass : CompilerGeneratedClass
{
- // TODO: Merge with AnonymousTypeParameter
- public class GeneratedParameter : Parameter
- {
- public GeneratedParameter (FullNamedExpression type, AnonymousTypeParameter p)
- : base (type, p.Name, Modifier.NONE, null, p.Location)
- {
- }
- }
-
static int types_counter;
public const string ClassNamePrefix = "<>__AnonType";
public const string SignatureForError = "anonymous type";
@@ -1696,10 +1687,21 @@ namespace Mono.CSharp {
Parameter[] ctor_params = new Parameter[parameters.Count];
for (int i = 0; i < parameters.Count; ++i) {
AnonymousTypeParameter p = parameters[i];
+ for (int ii = 0; ii < i; ++ii) {
+ if (parameters[ii].Name == p.Name) {
+ parent.Compiler.Report.Error (833, parameters[ii].Location,
+ "`{0}': An anonymous type cannot have multiple properties with the same \
name", + p.Name);
+
+ p = new AnonymousTypeParameter (null, "$" + i.ToString (), p.Location);
+ parameters[i] = p;
+ break;
+ }
+ }
t_args[i] = new SimpleName ("<" + p.Name + ">__T", p.Location);
t_params[i] = new TypeParameterName (t_args[i].Name, null, p.Location);
- ctor_params[i] = new GeneratedParameter (t_args[i], p);
+ ctor_params[i] = new Parameter (t_args[i], p.Name, Parameter.Modifier.NONE, \
null, p.Location); }
all_parameters = new ParametersCompiled (ctor_params);
Modified: mcs/mcs/assembly.cs
===================================================================
--- a/mcs/mcs/assembly.cs
+++ b/mcs/mcs/assembly.cs
@@ -377,7 +377,7 @@ namespace Mono.CSharp
}
var ci = a.Assembly.GetName ().CultureInfo;
- if (ci != System.Globalization.CultureInfo.InvariantCulture) {
+ if (!ci.Equals (System.Globalization.CultureInfo.InvariantCulture)) {
Report.Warning (1607, 1, "Referenced assembly `{0}' has different culture \
setting of `{1}'", a.Name, ci.Name);
}
Modified: mcs/mcs/attribute.cs
===================================================================
--- a/mcs/mcs/attribute.cs
+++ b/mcs/mcs/attribute.cs
@@ -245,20 +245,13 @@ namespace Mono.CSharp {
}
}
- TypeSpec ResolvePossibleAttributeType (ATypeNameExpression expr, ref bool is_attr)
+ TypeSpec ResolvePossibleAttributeType (ATypeNameExpression expr)
{
TypeExpr te = expr.ResolveAsTypeTerminal (context, false);
if (te == null)
return null;
- TypeSpec t = te.Type;
- if (t.IsAttribute) {
- is_attr = true;
- } else {
- Report.SymbolRelatedToPreviousError (t);
- Report.Error (616, Location, "`{0}': is not an attribute class", \
TypeManager.CSharpName (t));
- }
- return t;
+ return te.Type;
}
/// <summary>
@@ -278,7 +271,11 @@ namespace Mono.CSharp {
// print on success
try {
- t1 = ResolvePossibleAttributeType (expression, ref t1_is_attr);
+ t1 = ResolvePossibleAttributeType (expression);
+ if (t1 != null)
+ t1_is_attr = t1.IsAttribute;
+
+ resolve_printer.EndSession ();
if (nameEscaped) {
t2 = null;
@@ -286,15 +283,15 @@ namespace Mono.CSharp {
expanded = (ATypeNameExpression) expression.Clone (null);
expanded.Name += "Attribute";
- t2 = ResolvePossibleAttributeType (expanded, ref t2_is_attr);
+ t2 = ResolvePossibleAttributeType (expanded);
+ if (t2 != null)
+ t2_is_attr = t2.IsAttribute;
}
-
- resolve_printer.EndSession ();
} finally {
context.Module.Compiler.Report.SetPrinter (prev_recorder);
}
- if (t1_is_attr && t2_is_attr) {
+ if (t1_is_attr && t2_is_attr && t1 != t2) {
Report.Error (1614, Location, "`{0}' is ambiguous between `{1}' and `{2}'. Use \
either `@{0}' or `{0}Attribute'",
GetSignatureForError (), expression.GetSignatureForError (), \
expanded.GetSignatureForError ()); resolve_error = true;
@@ -311,8 +308,23 @@ namespace Mono.CSharp {
return;
}
- resolve_printer.Merge (prev_recorder);
resolve_error = true;
+
+ if (t1 != null) {
+ resolve_printer.Merge (prev_recorder);
+
+ Report.SymbolRelatedToPreviousError (t1);
+ Report.Error (616, Location, "`{0}': is not an attribute class", \
t1.GetSignatureForError ()); + return;
+ }
+
+ if (t2 != null) {
+ Report.SymbolRelatedToPreviousError (t2);
+ Report.Error (616, Location, "`{0}': is not an attribute class", \
t2.GetSignatureForError ()); + return;
+ }
+
+ resolve_printer.Merge (prev_recorder);
}
public TypeSpec ResolveType ()
Modified: mcs/mcs/ecore.cs
===================================================================
--- a/mcs/mcs/ecore.cs
+++ b/mcs/mcs/ecore.cs
@@ -4281,6 +4281,13 @@ namespace Mono.CSharp {
return null;
}
+ //
+ // These flags indicates we are running delegate probing conversion. No need to
+ // do more expensive checks
+ //
+ if ((restrictions & (Restrictions.ProbingOnly | Restrictions.CovariantDelegate)) \
== (Restrictions.CovariantDelegate | Restrictions.ProbingOnly)) + return (T) \
best_candidate; +
if (ambiguous_candidates != null) {
//
// Now check that there are no ambiguities i.e the selected method
@@ -4812,32 +4819,34 @@ namespace Mono.CSharp {
{
bool lvalue_instance = rhs != null && IsInstance && spec.DeclaringType.IsStruct;
- if (ResolveInstanceExpression (ec, rhs)) {
- // Resolve the field's instance expression while flow analysis is turned
- // off: when accessing a field "a.b", we must check whether the field
- // "a.b" is initialized, not whether the whole struct "a" is initialized.
+ if (rhs != this) {
+ if (ResolveInstanceExpression (ec, rhs)) {
+ // Resolve the field's instance expression while flow analysis is turned
+ // off: when accessing a field "a.b", we must check whether the field
+ // "a.b" is initialized, not whether the whole struct "a" is initialized.
- if (lvalue_instance) {
- using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) {
- bool out_access = rhs == EmptyExpression.OutAccess || rhs == \
EmptyExpression.LValueMemberOutAccess; + if (lvalue_instance) {
+ using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) {
+ bool out_access = rhs == EmptyExpression.OutAccess || rhs == \
EmptyExpression.LValueMemberOutAccess;
- Expression right_side =
- out_access ? EmptyExpression.LValueMemberOutAccess : \
EmptyExpression.LValueMemberAccess; + Expression right_side =
+ out_access ? EmptyExpression.LValueMemberOutAccess : \
EmptyExpression.LValueMemberAccess;
- InstanceExpression = InstanceExpression.ResolveLValue (ec, right_side);
- }
- } else {
- using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) {
- InstanceExpression = InstanceExpression.Resolve (ec, \
ResolveFlags.VariableOrValue); + InstanceExpression = \
InstanceExpression.ResolveLValue (ec, right_side); + }
+ } else {
+ using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) {
+ InstanceExpression = InstanceExpression.Resolve (ec, \
ResolveFlags.VariableOrValue); + }
}
+
+ if (InstanceExpression == null)
+ return null;
}
- if (InstanceExpression == null)
- return null;
+ DoBestMemberChecks (ec, spec);
}
- DoBestMemberChecks (ec, spec);
-
var fb = spec as FixedFieldSpec;
IVariableReference var = InstanceExpression as IVariableReference;
Modified: mcs/mcs/expression.cs
===================================================================
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -2532,7 +2532,7 @@ namespace Mono.CSharp
break;
return left;
}
- Error_OperatorCannotBeApplied (ec, this.left, this.right);
+
return null;
}
@@ -4859,6 +4859,9 @@ namespace Mono.CSharp
bool DoResolveBase (ResolveContext ec)
{
+ if (eclass != ExprClass.Unresolved)
+ return true;
+
type = pi.ParameterType;
eclass = ExprClass.Variable;
Modified: mcs/mcs/parameter.cs
===================================================================
--- a/mcs/mcs/parameter.cs
+++ b/mcs/mcs/parameter.cs
@@ -279,6 +279,9 @@ namespace Mono.CSharp {
get {
return parameter_type;
}
+ set {
+ parameter_type = value;
+ }
}
public FullNamedExpression TypeExpression {
Modified: mcs/mcs/property.cs
===================================================================
--- a/mcs/mcs/property.cs
+++ b/mcs/mcs/property.cs
@@ -1091,7 +1091,7 @@ namespace Mono.CSharp
public abstract class AEventAccessor : AbstractPropertyEventMethod
{
protected readonly Event method;
- ParametersCompiled parameters;
+ readonly ParametersCompiled parameters;
static readonly string[] attribute_targets = new string [] { "method", "param", \
"return" };
@@ -1142,7 +1142,10 @@ namespace Mono.CSharp
public virtual MethodBuilder Define (DeclSpace parent)
{
- parameters.Resolve (this);
+ // Fill in already resolved event type to speed things up and
+ // avoid confusing duplicate errors
+ ((Parameter) parameters.FixedParameters[0]).Type = method.member_type;
+ parameters.Types = new TypeSpec[] { method.member_type };
method_data = new MethodData (method, method.ModFlags,
method.flags | MethodAttributes.HideBySig | MethodAttributes.SpecialName, \
this);
Modified: mcs/mcs/statement.cs
===================================================================
--- a/mcs/mcs/statement.cs
+++ b/mcs/mcs/statement.cs
@@ -1873,14 +1873,7 @@ namespace Mono.CSharp {
var pi = variable as ParametersBlock.ParameterInfo;
if (pi != null) {
var p = pi.Parameter;
- if (p is AnonymousTypeClass.GeneratedParameter) {
- ParametersBlock.TopBlock.Report.Error (833, p.Location, "`{0}': An anonymous \
type cannot have multiple properties with the same name",
- p.Name);
- } else {
- ParametersBlock.TopBlock.Report.Error (100, p.Location, "The parameter name \
`{0}' is a duplicate", p.Name);
- }
-
- return;
+ ParametersBlock.TopBlock.Report.Error (100, p.Location, "The parameter name \
`{0}' is a duplicate", p.Name); }
ParametersBlock.TopBlock.Report.Error (128, variable.Location,
Added: mcs/tests/test-818.cs
===================================================================
--- /dev/null
+++ b/mcs/tests/test-818.cs
@@ -0,0 +1,21 @@
+using System;
+
+namespace A { class CAttribute : Attribute { } }
+namespace B { class CAttribute : Attribute { } }
+
+namespace Foo
+{
+ using A;
+ using B;
+
+ using C = A.CAttribute;
+
+ [C]
+ class Foo
+ {
+ static void Main ()
+ {
+ }
+ }
+}
+
Commit: 30443d63dd72cc885f1c9ff9853468f6202711cf
Author: Rolf Bjarne Kvinge <RKvinge@novell.com>
Date: 03/31/2011 10:01:22
URL: https://github.com/mono/mono/commit/30443d63dd72cc885f1c9ff9853468f6202711cf
System.ServiceModel: make it a lot more compatible with Silverlight
Changed paths:
M mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
M mcs/class/System.ServiceModel/Dummy_2_1.cs
M mcs/class/System.ServiceModel/System.Collections.Generic/SynchronizedCollection.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Channels/AddressHeaderCollection.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Description/FaultDescription.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Description/MessageDescription.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlName.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs
M mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/FaultContractInfo.cs
M mcs/class/System.ServiceModel/System.ServiceModel/FaultException.cs
Modified: mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
===================================================================
--- a/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
@@ -61,7 +61,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyKeyFile ("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
-[assembly: Debuggable \
(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: \
SecurityCritical (SecurityCriticalScope.Explicit)] #endif
@@ -70,6 +69,7 @@ using System.Runtime.InteropServices;
[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
[assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)]
[assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = \
true)] +[assembly: Debuggable \
(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
#if !MOONLIGHT && !NET_2_1
[assembly: InternalsVisibleTo ("System.ServiceModel.Web, \
PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f \
67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5 \
ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
Modified: mcs/class/System.ServiceModel/Dummy_2_1.cs
===================================================================
--- a/mcs/class/System.ServiceModel/Dummy_2_1.cs
+++ b/mcs/class/System.ServiceModel/Dummy_2_1.cs
@@ -1,5 +1,10 @@
+using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Serialization;
+using System.Runtime.CompilerServices;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
namespace System.Runtime.CompilerServices
{
@@ -32,6 +37,15 @@ namespace System.ServiceModel
return false;
}
}
+
+ [FriendAccessAllowed]
+ internal interface IDispatchOperation
+ {
+ bool DeserializeRequest { get; set; }
+ IDispatchMessageFormatter Formatter { get; set; }
+ string Name { get; }
+ bool SerializeReply { get; set; }
+ }
}
namespace System.ServiceModel.Channels
{
@@ -73,30 +87,69 @@ namespace System.ServiceModel.Description
}
}
}
-namespace System.ServiceModel.DiagnosticUtility
+namespace System.ServiceModel
{
// introduced for silverlight sdk compatibility
- internal class ExceptionUtility
+ [FriendAccessAllowed ()]
+ internal class DiagnosticUtility
{
- public static Exception ThrowHelperError (Exception error)
+ [FriendAccessAllowed ()]
+ internal class ExceptionUtility
{
- return error;
- }
+ public static Exception ThrowHelperArgument (string message) { throw new \
NotImplementedException (); } +
+ public static Exception ThrowHelperArgument (string paramName, string message) { \
throw new NotImplementedException (); } +
+ public static Exception ThrowHelperArgumentNull (string arg)
+ {
+ return new ArgumentNullException (arg);
+ }
- public static Exception ThrowHelperArgumentNull (string arg)
- {
- return new ArgumentNullException (arg);
+ [FriendAccessAllowed]
+ internal static Exception ThrowHelperCallback (Exception e) { throw new \
NotImplementedException (); } +
+ [FriendAccessAllowed]
+ internal static Exception ThrowHelperCallback (string message, Exception \
innerException) { throw new NotImplementedException (); } +
+ public static Exception ThrowHelperError (Exception error)
+ {
+ return error;
+ }
+
+ [FriendAccessAllowed]
+ internal static Exception ThrowHelperFatal (string message, Exception \
innerException) { throw new NotImplementedException (); } +
+ [FriendAccessAllowed]
+ internal static Exception ThrowHelperInternal (bool fatal) { throw new \
NotImplementedException (); } +
+ public static Exception ThrowHelperWarning (Exception e) { throw new \
NotImplementedException (); } }
}
}
+
namespace System.ServiceModel.Dispatcher
{
- public class EndpointDispatcher
+ public sealed class EndpointDispatcher
{
internal EndpointDispatcher ()
{
}
}
+
+ internal class FaultFormatter : IClientFaultFormatter
+ {
+ internal FaultFormatter (Type[] detailTypes) { throw new NotImplementedException \
(); } + internal FaultFormatter (SynchronizedCollection<FaultContractInfo> \
faultContractInfoCollection) { throw new NotImplementedException (); } + protected \
virtual FaultException CreateFaultException (MessageFault messageFault, string \
action) { throw new NotImplementedException (); } + protected FaultException \
CreateFaultException (MessageFault messageFault, string action, object detailObj, \
Type detailType, XmlDictionaryReader detailReader) { throw new \
NotImplementedException (); } + public FaultException Deserialize (MessageFault \
messageFault, string action) { throw new NotImplementedException (); } + protected \
virtual XmlObjectSerializer GetSerializer (Type detailType, string \
faultExceptionAction, out string action) { throw new NotImplementedException (); } \
+ } +
+ internal interface IClientFaultFormatter
+ {
+ FaultException Deserialize (MessageFault messageFault, string action);
+ }
}
namespace System.ServiceModel.Security
{
@@ -118,4 +171,3 @@ namespace Mono.Xml.XPath
{
class Dummy {}
}
-
Modified: mcs/class/System.ServiceModel/System.Collections.Generic/SynchronizedCollection.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.Collections.Generic/SynchronizedCollection.cs
+++ b/mcs/class/System.ServiceModel/System.Collections.Generic/SynchronizedCollection.cs
@@ -33,6 +33,22 @@ using System.Runtime.InteropServices;
namespace System.Collections.Generic
{
+#if MOONLIGHT
+ public class SynchronizedCollection<T> : Collection<T>
+ {
+ public object SyncRoot;
+
+ public SynchronizedCollection ()
+ {
+ SyncRoot = new object ();
+ }
+
+ internal SynchronizedCollection (object syncRoot)
+ {
+ SyncRoot = syncRoot;
+ }
+ }
+#else
[ComVisibleAttribute (false)]
public class SynchronizedCollection<T> : IList<T>, ICollection<T>,
IEnumerable<T>, IList, ICollection, IEnumerable
@@ -257,4 +273,5 @@ namespace System.Collections.Generic
#endregion
}
+#endif
}
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Channels/AddressHeaderCollection.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/AddressHeaderCollection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/AddressHeaderCollection.cs
@@ -72,5 +72,10 @@ namespace System.ServiceModel.Channels
return null;
}
+
+ public AddressHeader[] FindAll (string name, string ns)
+ {
+ throw new NotImplementedException ();
+ }
}
}
\ No newline at end of file
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
@@ -35,12 +35,22 @@ namespace System.ServiceModel.Channels
{
public abstract class MessageEncodingBindingElement : BindingElement
{
- public MessageEncodingBindingElement ()
+#if MOONLIGHT
+ protected
+#else
+ public
+#endif
+ MessageEncodingBindingElement ()
{
}
[MonoTODO]
- public MessageEncodingBindingElement (MessageEncodingBindingElement source)
+#if MOONLIGHT
+ protected
+#else
+ public
+#endif
+ MessageEncodingBindingElement (MessageEncodingBindingElement source)
{
MessageVersion = source.MessageVersion;
}
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
@@ -29,6 +29,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
using System.Linq;
using System.Net.Security;
using System.Reflection;
@@ -49,6 +50,7 @@ namespace System.ServiceModel.Description
}
}
+ [DebuggerDisplay ("Name={name}, Namespace={ns}, ContractType={contractType}")]
public class ContractDescription
{
[MonoTODO]
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Description/FaultDescription.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/FaultDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/FaultDescription.cs
@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
using System.Net.Security;
using System.Reflection;
using System.Runtime.Serialization;
@@ -35,6 +36,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Description
{
+ [DebuggerDisplay ("Name={name}, Action={action}, DetailType={detailType}")]
public class FaultDescription
{
string action, name, ns;
@@ -79,5 +81,12 @@ namespace System.ServiceModel.Description
has_protection_level = true;
}
}
+#if MOONLIGHT
+ // introduced for silverlight sdk compatibility
+ internal XmlName ElementName {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
}
}
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Description/MessageDescription.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessageDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessageDescription.cs
@@ -27,6 +27,7 @@
//
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Net.Security;
using System.Runtime.Serialization;
using System.ServiceModel;
@@ -36,6 +37,7 @@ using System.Xml;
namespace System.ServiceModel.Description
{
+ [DebuggerDisplay ("Action={action}, Direction={direction}, \
MessageType={messageType}")] public class MessageDescription
{
string action;
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs
@@ -27,6 +27,7 @@
//
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Net.Security;
using System.Runtime.Serialization;
using System.Reflection;
@@ -35,6 +36,7 @@ using System.Xml.Serialization;
namespace System.ServiceModel.Description
{
+ [DebuggerDisplay ("Name={name}, Namespace={ns}, Type={Type}, Index={index}}")]
public class MessagePartDescription
{
int index;
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
using System.Net.Security;
using System.Reflection;
using System.Runtime.Serialization;
@@ -35,6 +36,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Description
{
+ [DebuggerDisplay ("Name={name}, IsInitiating={isInitiating}, \
IsTerminating={isTerminating}")] public class OperationDescription
{
MethodInfo begin_method, end_method, sync_method;
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
@@ -27,12 +27,15 @@
//
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
namespace System.ServiceModel.Description
{
+ [DebuggerDisplay ("Name={name}")]
+ [DebuggerDisplay ("Address={address}")]
public class ServiceEndpoint
{
ContractDescription contract;
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlName.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlName.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlName.cs
@@ -75,5 +75,26 @@ namespace System.ServiceModel.Description
{
return encoded_name;
}
+
+ public static bool operator == (XmlName a, XmlName b)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool operator != (XmlName a, XmlName b)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override bool Equals (object obj)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override int GetHashCode ()
+ {
+ throw new NotImplementedException ();
+ }
+
}
}
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs
@@ -61,12 +61,12 @@ namespace System.ServiceModel.Dispatcher
get { return operation_name; }
}
- public bool IsValidReturnValue (MessagePartDescription part)
+ internal static bool IsValidReturnValue (MessagePartDescription part)
{
return part != null && part.Type != typeof (void);
}
- void Validate (OperationDescription od, bool isRpc, bool isEncoded)
+ internal static void Validate (OperationDescription od, bool isRpc, bool \
isEncoded) {
bool hasParameter = false, hasVoid = false;
foreach (var md in od.Messages) {
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
@@ -154,7 +154,11 @@ namespace System.ServiceModel.Dispatcher
get { return name; }
}
+#if MOONLIGHT
+ public IList<IParameterInspector> ParameterInspectors {
+ #else
public SynchronizedCollection<IParameterInspector> ParameterInspectors {
+#endif
get { return inspectors; }
}
@@ -189,5 +193,21 @@ namespace System.ServiceModel.Dispatcher
}
throw new InvalidOperationException ("Cannot change this property after the \
service host is opened"); }
+
+#if MOONLIGHT
+ // introduced for silverlight sdk compatibility
+ internal bool IsFaultFormatterSetExplicit {
+ get { throw new NotImplementedException (); }
+ }
+ // introduced for silverlight sdk compatibility
+ internal SynchronizedCollection<FaultContractInfo> FaultContractInfos {
+ get { throw new NotImplementedException (); }
+ }
+ // introduced for silverlight sdk compatibility
+ internal IClientFaultFormatter FaultFormatter {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
}
}
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
@@ -84,7 +84,11 @@ namespace System.ServiceModel.Dispatcher
public DispatchRuntime CallbackDispatchRuntime { get; internal set; }
#endif
+#if MOONLIGHT
+ public IList<IClientMessageInspector> MessageInspectors {
+#else
public SynchronizedCollection<IClientMessageInspector> MessageInspectors {
+#endif
get { return inspectors; }
}
@@ -127,5 +131,11 @@ namespace System.ServiceModel.Dispatcher
public ClientOperation UnhandledClientOperation {
get { throw new NotImplementedException (); }
}
+
+ [MonoTODO]
+ public bool MessageVersionNoneFaultsEnabled {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
}
}
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs
@@ -36,6 +36,9 @@ using System.Text;
namespace System.ServiceModel.Dispatcher
{
public sealed class DispatchOperation
+#if MOONLIGHT
+ : IDispatchOperation
+#endif
{
internal class DispatchOperationCollection :
SynchronizedKeyedCollection<string, DispatchOperation>
@@ -225,5 +228,26 @@ namespace System.ServiceModel.Dispatcher
throw new InvalidOperationException ("Cannot change this property after the \
service host is opened"); #endif
}
+
+#if MOONLIGHT
+ bool IDispatchOperation.DeserializeRequest {
+ get { return DeserializeRequest; }
+ set { DeserializeRequest = value; }
+ }
+
+ IDispatchMessageFormatter IDispatchOperation.Formatter {
+ get { return Formatter; }
+ set { Formatter = value; }
+ }
+
+ string IDispatchOperation.Name {
+ get { return Name; }
+ }
+
+ bool IDispatchOperation.SerializeReply {
+ get { return SerializeReply; }
+ set { SerializeReply = value; }
+ }
+#endif
}
}
Modified: mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/FaultContractInfo.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/FaultContractInfo.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/FaultContractInfo.cs
@@ -27,6 +27,8 @@
using System;
using System.Runtime.Serialization;
using System.ServiceModel;
+using System.ServiceModel.Description;
+using System.Collections.Generic;
namespace System.ServiceModel.Dispatcher
{
@@ -42,6 +44,14 @@ namespace System.ServiceModel.Dispatcher
Detail = detail;
}
+#if MOONLIGHT
+ // introduced for silverlight sdk compatibility
+ internal FaultContractInfo (string action, Type detail, XmlName elementName, \
string ns, IList<Type> knownTypes) + {
+ throw new NotImplementedException ();
+ }
+#endif
+
DataContractSerializer serializer;
public string Action { get; private set; }
Modified: mcs/class/System.ServiceModel/System.ServiceModel/FaultException.cs
===================================================================
--- a/mcs/class/System.ServiceModel/System.ServiceModel/FaultException.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/FaultException.cs
@@ -105,6 +105,12 @@ namespace System.ServiceModel
throw new NotImplementedException ();
}
+ [MonoTODO]
+ public static FaultException CreateFault (MessageFault messageFault, string \
action, params Type[] faultDetailTypes) + {
+ throw new NotImplementedException ();
+ }
+
public virtual MessageFault CreateMessageFault ()
{
return fault;
Commit: f64261401d7f0dcb0225a63d0365b052b60031a5
Author: Rolf Bjarne Kvinge <RKvinge@novell.com>
Date: 03/31/2011 10:05:03
URL: https://github.com/mono/mono/commit/f64261401d7f0dcb0225a63d0365b052b60031a5
Fix many corcompare issues for moonlight
Changed paths:
M mcs/class/System.Core/System.Linq/Queryable.cs
M mcs/class/System.Net/Assembly/AssemblyInfo.cs
M mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
M mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
M mcs/class/System.XML/System.Xml/XmlConvert.cs
M mcs/class/System/Assembly/AssemblyInfo.cs
M mcs/class/corlib/System.Globalization/HijriCalendar.cs
M mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs
M mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs
M mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
M mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
M mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
M mcs/class/corlib/System.Reflection/EventInfo.cs
M mcs/class/corlib/System.Reflection/ParameterInfo.cs
M mcs/class/corlib/System.Resources/ResourceSet.cs
M mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
M mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
M mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs
M mcs/class/corlib/System.Threading/Timer.cs
M mcs/class/corlib/System.Threading/WaitHandle.cs
M mcs/class/corlib/System/AppDomain.cs
M mcs/class/corlib/System/Lazy.cs
M mcs/class/corlib/System/STAThreadAttribute.cs
M mcs/class/corlib/System/_AppDomain.cs
M mcs/class/corlib/moonlight_raw_corlib.dll.sources
Modified: mcs/class/System.Core/System.Linq/Queryable.cs
===================================================================
--- a/mcs/class/System.Core/System.Linq/Queryable.cs
+++ b/mcs/class/System.Core/System.Linq/Queryable.cs
@@ -1603,7 +1603,7 @@ namespace System.Linq {
#endregion
-#if NET_4_0
+#if NET_4_0 || MOONLIGHT
#region Zip
public static IQueryable<TResult> Zip<TFirst, TSecond, TResult> (this \
IQueryable<TFirst> source1, IEnumerable<TSecond> source2, Expression<Func<TFirst, \
TSecond, TResult>> resultSelector)
Modified: mcs/class/System.Net/Assembly/AssemblyInfo.cs
===================================================================
--- a/mcs/class/System.Net/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Net/Assembly/AssemblyInfo.cs
@@ -60,6 +60,9 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("System.Windows, \
PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E86 \
49383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811 \
149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Windows.Browser, \
PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E86 \
49383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811 \
149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Xml, \
PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E86 \
49383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811 \
149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
+#if MOONLIGHT
+ [assembly: Debuggable \
(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +#endif
#else
[assembly: AssemblyKeyFile ("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
Modified: mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
===================================================================
--- a/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
@@ -55,6 +55,7 @@ using System.Runtime.InteropServices;
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
+[assembly: Debuggable \
(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] #if NET_2_1
[assembly: AssemblyKeyFile ("../silverlight.pub")]
[assembly: InternalsVisibleTo ("System.ServiceModel, \
PublicKey=0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F \
67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5 \
EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9")]
@@ -63,7 +64,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyKeyFile ("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
-[assembly: Debuggable \
(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: \
SecurityCritical (SecurityCriticalScope.Explicit)] #if NET_4_0
// for SyndicationElementExtension
Modified: mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
===================================================================
--- a/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
@@ -27,6 +27,7 @@
//
using System;
+using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Security;
@@ -67,3 +68,6 @@ using System.Runtime.InteropServices;
#else
[assembly: InternalsVisibleTo ("dummy-System.Json, \
PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E86 \
49383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811 \
149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
#endif
+
+[assembly: Debuggable \
(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +[assembly: \
CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
Modified: mcs/class/System.XML/System.Xml/XmlConvert.cs
===================================================================
--- a/mcs/class/System.XML/System.Xml/XmlConvert.cs
+++ b/mcs/class/System.XML/System.Xml/XmlConvert.cs
@@ -924,5 +924,52 @@ namespace System.Xml {
}
#endif
+
+#if NET_4_0 || NET_2_1
+ public static bool IsNCNameChar (char ch)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool IsPublicIdChar (char ch)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool IsStartNCNameChar (char ch)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool IsWhitespaceChar (char ch)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool IsXmlChar (char ch)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool IsXmlSurrogatePair (char lowChar, char highChar)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static string VerifyPublicId (string publicId)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static string VerifyWhitespace (string content)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static string VerifyXmlChars (string content)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
}
}
Modified: mcs/class/System/Assembly/AssemblyInfo.cs
===================================================================
--- a/mcs/class/System/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System/Assembly/AssemblyInfo.cs
@@ -78,4 +78,8 @@ using System.Runtime.InteropServices;
[assembly: DefaultDependency (LoadHint.Always)]
#endif
+#if NET_2_1 || NET_4_0
+[assembly: Debuggable \
(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +#endif
+
[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
Modified: mcs/class/corlib/System.Globalization/HijriCalendar.cs
===================================================================
--- a/mcs/class/corlib/System.Globalization/HijriCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/HijriCalendar.cs
@@ -950,6 +950,12 @@ public class HijriCalendar : Calendar {
return Max;
}
}
+
+ [MonoTODO ()]
+ public int HijriAdjustment {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
} // class HijriCalendar
} // namespace System.Globalization
Modified: mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs
===================================================================
--- a/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs
@@ -165,6 +165,21 @@ namespace System.IO.IsolatedStorage {
return File.Exists (Verify (path));
}
+ public DateTimeOffset GetCreationTime (string path)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DateTimeOffset GetLastAccessTime (string path)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DateTimeOffset GetLastWriteTime (string path)
+ {
+ throw new NotImplementedException ();
+ }
+
private string HideAppDir (string path)
{
// remove the "isolated" part of the path (and the extra '/')
@@ -326,6 +341,32 @@ namespace System.IO.IsolatedStorage {
IsolatedStorage.Quota = newQuotaSize;
return result;
}
+
+ public void CopyFile (string sourceFileName, string destinationFileName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyFile (string sourceFileName, string destinationFileName, bool \
overwrite) + {
+ throw new NotImplementedException ();
+ }
+
+ public void MoveDirectory (string sourceDirectoryName, string \
destinationDirectoryName) + {
+ throw new NotImplementedException ();
+ }
+
+ public void MoveFile (string sourceFileName, string destinationFileName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public long UsedSize {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
}
}
#endif
Modified: mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs
===================================================================
--- a/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs
@@ -86,6 +86,12 @@ namespace System.IO.IsolatedStorage {
base.Flush ();
}
+ public override void Flush (bool flushToDisk)
+ {
+ container.PreCheck ();
+ base.Flush (flushToDisk);
+ }
+
public override int Read (byte [] buffer, int offset, int count)
{
container.PreCheck ();
Modified: mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
===================================================================
--- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
@@ -1308,6 +1308,35 @@ namespace System.Reflection.Emit
public override bool IsDynamic {
get { return true; }
}
+
+ public override bool Equals (object obj)
+ {
+ return base.Equals (obj);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode ();
+ }
+
+ public override bool IsDefined (Type attributeType, bool inherit)
+ {
+ return base.IsDefined (attributeType, inherit);
+ }
+
+ public override object[] GetCustomAttributes (bool inherit)
+ {
+ return base.GetCustomAttributes (inherit);
+ }
+
+ public override object[] GetCustomAttributes (Type attributeType, bool inherit)
+ {
+ return base.GetCustomAttributes (attributeType, inherit);
+ }
+
+ public override string FullName {
+ get { return base.FullName; }
+ }
#endif
}
}
Modified: mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
===================================================================
--- a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
@@ -651,5 +651,11 @@ namespace System.Reflection.Emit
{
throw new NotImplementedException ();
}
+
+#if NET_4_0 || MOONLIGHT
+ public override ParameterInfo ReturnParameter {
+ get { return base.ReturnParameter; }
+ }
+#endif
}
}
Modified: mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
===================================================================
--- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
@@ -919,6 +919,51 @@ namespace System.Reflection.Emit {
return Type.GetTypeFromHandle (new RuntimeTypeHandle (handle));
}
+ public override bool Equals (object obj)
+ {
+ return base.Equals (obj);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode ();
+ }
+
+ public override bool IsDefined (Type attributeType, bool inherit)
+ {
+ return base.IsDefined (attributeType, inherit);
+ }
+
+ public override object[] GetCustomAttributes (bool inherit)
+ {
+ return base.GetCustomAttributes (inherit);
+ }
+
+ public override object[] GetCustomAttributes (Type attributeType, bool inherit)
+ {
+ return base.GetCustomAttributes (attributeType, inherit);
+ }
+
+ public override FieldInfo GetField (string name, BindingFlags bindingAttr)
+ {
+ return base.GetField (name, bindingAttr);
+ }
+
+ public override FieldInfo[] GetFields (BindingFlags bindingFlags)
+ {
+ return base.GetFields (bindingFlags);
+ }
+
+ public override MethodInfo[] GetMethods (BindingFlags bindingFlags)
+ {
+ return base.GetMethods (bindingFlags);
+ }
+
+ public override int MetadataToken {
+ get {
+ return base.MetadataToken;
+ }
+ }
#endif
}
Modified: mcs/class/corlib/System.Reflection/EventInfo.cs
===================================================================
--- a/mcs/class/corlib/System.Reflection/EventInfo.cs
+++ b/mcs/class/corlib/System.Reflection/EventInfo.cs
@@ -42,7 +42,7 @@ namespace System.Reflection {
public abstract EventAttributes Attributes {get;}
public
-#if NET_4_0
+#if NET_4_0 || MOONLIGHT
virtual
#endif
Type EventHandlerType {
@@ -62,7 +62,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
+#if NET_4_0 || MOONLIGHT
virtual
#endif
bool IsMulticast {get {return true;}}
@@ -78,7 +78,7 @@ namespace System.Reflection {
[DebuggerHidden]
[DebuggerStepThrough]
public
-#if NET_4_0
+#if NET_4_0 || MOONLIGHT
virtual
#endif
void AddEventHandler (object target, Delegate handler)
@@ -125,7 +125,7 @@ namespace System.Reflection {
[DebuggerHidden]
[DebuggerStepThrough]
public
-#if NET_4_0
+#if NET_4_0 || MOONLIGHT
virtual
#endif
void RemoveEventHandler (object target, Delegate handler)
Modified: mcs/class/corlib/System.Reflection/ParameterInfo.cs
===================================================================
--- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
@@ -184,7 +184,11 @@ namespace System.Reflection
[MethodImplAttribute (MethodImplOptions.InternalCall)]
extern int GetMetadataToken ();
- public int MetadataToken {
+ public
+#if NET_4_0 || MOONLIGHT
+ virtual
+#endif
+ int MetadataToken {
get {
if (MemberImpl is PropertyInfo) {
PropertyInfo prop = (PropertyInfo)MemberImpl;
Modified: mcs/class/corlib/System.Resources/ResourceSet.cs
===================================================================
--- a/mcs/class/corlib/System.Resources/ResourceSet.cs
+++ b/mcs/class/corlib/System.Resources/ResourceSet.cs
@@ -41,7 +41,9 @@ namespace System.Resources
[ComVisible (true)]
public class ResourceSet : IDisposable, IEnumerable
{
+#if !MOONLIGHT
[NonSerialized]
+#endif
protected IResourceReader Reader;
protected Hashtable Table;
bool resources_read;
Modified: mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
===================================================================
--- a/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
@@ -145,5 +145,12 @@ namespace System.Security.Cryptography {
_handle = IntPtr.Zero;
}
}
+
+#if NET_4_0 || MOONLIGHT
+ protected override void Dispose (bool disposing)
+ {
+ base.Dispose (disposing);
+ }
+#endif
}
}
Modified: mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
===================================================================
--- a/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
@@ -58,7 +58,7 @@ namespace System.Security.Cryptography {
public abstract void GetBytes (byte[] data);
public abstract void GetNonZeroBytes (byte[] data);
-#if NET_4_0
+#if NET_4_0 || MOONLIGHT
public void Dispose ()
{
Dispose (true);
Modified: mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs
===================================================================
--- a/mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs
+++ b/mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs
@@ -36,7 +36,10 @@ using System.Runtime.InteropServices;
namespace System.Threading
{
[ComVisible (true)]
- public sealed class RegisteredWaitHandle : MarshalByRefObject
+ public sealed class RegisteredWaitHandle
+#if !MOONLIGHT
+ : MarshalByRefObject
+#endif
{
WaitHandle _waitObject;
WaitOrTimerCallback _callback;
Modified: mcs/class/corlib/System.Threading/Timer.cs
===================================================================
--- a/mcs/class/corlib/System.Threading/Timer.cs
+++ b/mcs/class/corlib/System.Threading/Timer.cs
@@ -34,7 +34,12 @@ using System.Collections;
namespace System.Threading
{
[ComVisible (true)]
- public sealed class Timer : MarshalByRefObject, IDisposable
+ public sealed class Timer
+#if MOONLIGHT
+ : IDisposable
+#else
+ : MarshalByRefObject, IDisposable
+#endif
{
static Scheduler scheduler = Scheduler.Instance;
#region Timer instance fields
Modified: mcs/class/corlib/System.Threading/WaitHandle.cs
===================================================================
--- a/mcs/class/corlib/System.Threading/WaitHandle.cs
+++ b/mcs/class/corlib/System.Threading/WaitHandle.cs
@@ -40,7 +40,12 @@ using System.Runtime.ConstrainedExecution;
namespace System.Threading
{
[ComVisible (true)]
- public abstract class WaitHandle : MarshalByRefObject, IDisposable
+ public abstract class WaitHandle
+#if MOONLIGHT
+ : IDisposable
+#else
+ : MarshalByRefObject, IDisposable
+#endif
{
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern bool WaitAll_internal(WaitHandle[] handles, int ms, bool \
exitContext); @@ -213,7 +218,7 @@ namespace System.Threading
GC.SuppressFinalize (this);
}
-#if NET_4_0 || MOBILE
+#if NET_4_0 || MOBILE || MOONLIGHT
public void Dispose ()
#else
void IDisposable.Dispose ()
Modified: mcs/class/corlib/System/AppDomain.cs
===================================================================
--- a/mcs/class/corlib/System/AppDomain.cs
+++ b/mcs/class/corlib/System/AppDomain.cs
@@ -57,12 +57,14 @@ using System.Text;
namespace System {
[ComVisible (true)]
-#if !NET_2_1
+#if !NET_2_1 || MOONLIGHT
[ComDefaultInterface (typeof (_AppDomain))]
#endif
[ClassInterface(ClassInterfaceType.None)]
-#if NET_2_1
- public sealed class AppDomain : MarshalByRefObject {
+#if MOONLIGHT
+ public sealed class AppDomain : _AppDomain {
+#elif NET_2_1
+ public sealed class AppDomain : MarshalByRefObject, _AppDomain {
#else
public sealed class AppDomain : MarshalByRefObject, _AppDomain, IEvidenceFactory {
#endif
@@ -679,10 +681,12 @@ namespace System {
return base.GetType ();
}
+#if !MOONLIGHT
public override object InitializeLifetimeService ()
{
return null;
}
+#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern Assembly LoadAssembly (string assemblyRef, Evidence \
securityEvidence, bool refOnly);
Modified: mcs/class/corlib/System/Lazy.cs
===================================================================
--- a/mcs/class/corlib/System/Lazy.cs
+++ b/mcs/class/corlib/System/Lazy.cs
@@ -41,6 +41,7 @@ namespace System
[SerializableAttribute]
[ComVisibleAttribute(false)]
[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, \
ExternalThreading = true)] + [DebuggerDisplay ("ThreadSafetyMode={Mode}, \
IsValueCreated={IsValueCreated}, IsValueFaulted={IsValueFaulted}, \
Value={ValueForDebugDisplay}")] public class Lazy<T>
{
T value;
Modified: mcs/class/corlib/System/STAThreadAttribute.cs
===================================================================
--- a/mcs/class/corlib/System/STAThreadAttribute.cs
+++ b/mcs/class/corlib/System/STAThreadAttribute.cs
@@ -33,6 +33,9 @@ using System.Runtime.InteropServices;
namespace System
{
+#if MOONLIGHT
+ [Obsolete ("STAThreadAttribute is not supported in this release. It has been left \
in so that legacy tools can be used with this release, but it cannot be used in your \
code.", true)] +#endif
[AttributeUsage (AttributeTargets.Method)]
[ComVisible (true)]
public sealed class STAThreadAttribute : Attribute
Modified: mcs/class/corlib/System/_AppDomain.cs
===================================================================
--- a/mcs/class/corlib/System/_AppDomain.cs
+++ b/mcs/class/corlib/System/_AppDomain.cs
@@ -44,10 +44,13 @@ namespace System
[Guid ("05F696DC-2B29-3663-AD8B-C4389CF2A713")]
public interface _AppDomain
{
+#if !MOONLIGHT
string BaseDirectory {get; }
string DynamicDirectory {get; }
Evidence Evidence {get; }
+#endif
string FriendlyName {get; }
+#if !MOONLIGHT
string RelativeSearchPath {get; }
bool ShadowCopyFiles {get; }
@@ -59,7 +62,9 @@ namespace System
[SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
void ClearShadowCopyPath ();
+#endif
+#if !MOONLIGHT
ObjectHandle CreateInstance (string assemblyName, string typeName);
ObjectHandle CreateInstance (string assemblyName, string typeName, object[] \
activationAttributes); ObjectHandle CreateInstance (string assemblyName, string \
typeName, bool ignoreCase, @@ -71,7 +76,7 @@ namespace System
ObjectHandle CreateInstanceFrom (string assemblyFile, string typeName, bool \
ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo \
culture, object[] activationAttributes, Evidence securityAttributes);
-
+#endif
AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess \
access); AssemblyBuilder DefineDynamicAssembly (AssemblyName name, \
AssemblyBuilderAccess access, Evidence evidence); AssemblyBuilder \
DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir); \
@@ -104,12 +109,16 @@ namespace System #if !NET_4_0
[SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
#endif
+#if !MOONLIGHT
object GetLifetimeService ();
+#endif
Type GetType ();
+#if !MOONLIGHT
[SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
object InitializeLifetimeService ();
+#endif
Assembly Load (AssemblyName assemblyRef);
Assembly Load (byte[] rawAssembly);
@@ -119,21 +128,26 @@ namespace System
Assembly Load (string assemblyString, Evidence assemblySecurity);
Assembly Load (byte[] rawAssembly, byte[] rawSymbolStore, Evidence \
securityEvidence);
+#if !MOONLIGHT
[SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
void SetAppDomainPolicy (PolicyLevel domainPolicy);
[SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
void SetCachePath (string s);
+#endif
[SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
void SetData (string name, object data);
+#if !MOONLIGHT
void SetPrincipalPolicy (PrincipalPolicy policy);
[SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
void SetShadowCopyPath (string s);
void SetThreadPrincipal (IPrincipal principal);
+#endif
+
string ToString ();
[method: SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
@@ -157,6 +171,7 @@ namespace System
[method: SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
event UnhandledExceptionEventHandler UnhandledException;
+#if !NET_2_1
void GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, \
IntPtr rgDispId);
void GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo);
@@ -165,5 +180,6 @@ namespace System
void Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, \
IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
+#endif
}
}
Modified: mcs/class/corlib/moonlight_raw_corlib.dll.sources
===================================================================
--- a/mcs/class/corlib/moonlight_raw_corlib.dll.sources
+++ b/mcs/class/corlib/moonlight_raw_corlib.dll.sources
@@ -56,6 +56,7 @@ Mono.Xml/SmallXmlParser.cs
System/AccessViolationException.cs
System/Activator.cs
System/AppDomain.cs
+System/_AppDomain.cs
System/AppDomainInitializer.cs
System/AppDomainManager_2_1.cs
System/AppDomainSetup.cs
_______________________________________________
Mono-patches maillist - Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic