Compare commits

...
7 Commits
Author SHA1 Message Date
nobody af150fc45b This commit was manufactured by cvs2svn to create tag 'MCS_0_14'.
svn path=/tags/MCS_0_14/mcs/; revision=6680
2002-08-16 16:54:02 +00:00
Gonzalo Paniagua Javier 074dd116b5 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* FormatterServices.cs:a implemented GetSerializableMembers ().

svn path=/trunk/mcs/; revision=6679
2002-08-16 16:54:02 +00:00
Jaime Anguiano Olarra 39bf505fc8 Reordered. Updated. New links.
svn path=/trunk/mono/; revision=6678
2002-08-16 16:52:10 +00:00
Gonzalo Paniagua Javier 7fa479a7be 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* FormatterServices.cs: New file with some implementation.

svn path=/trunk/mcs/; revision=6677
2002-08-16 15:35:10 +00:00
Duncan Mak 0e72616dce Various serialization patches from Cesar.
2002-08-14  Cesar Octavio Lopez Nataren <[email protected]>

	* regex.cs: Added the ctr for ISerializable implementation and
	implemented the GetObjectData function.

2002-08-14  Cesar Octavio Lopez Nataren <[email protected]>

	* SoapFault.cs: Added the ctr for ISerializable implementation and
	implemented GetObjectData.

2002-08-14  Cesar Octavio Lopez Nataren <[email protected]>

	* WeakReference.cs: Changed the constructor and GetObjectData
	method needed for ISerializable implementation in order to be
	compatible with SOAP generated by MS.

svn path=/trunk/mcs/; revision=6676
2002-08-16 14:39:31 +00:00
Martin Baulig 7f0542b133 Importing NUnit 1.11.
svn path=/branches/NUNIT/mcs/; revision=2713
2002-02-27 09:38:21 +00:00
nobody 9f187b5dd0 This commit was manufactured by cvs2svn to create branch 'NUNIT'.
svn path=/branches/NUNIT/mcs/; revision=2712
2002-02-27 09:38:18 +00:00
12 changed files with 250 additions and 78 deletions

No files matched your search

+33 -6
View File
@@ -1,9 +1,36 @@
* Mono for beginners
Hinne Hettema has provided us a beautiful and complete
document on how to obtain, install and test Mono on
a Linux system.
Hinne Hettema and Jaime Anguiano Olarra are providing us with
nice and complete set of documents (HOWTOs) about how to install,
configure, run and test the software developed by the Mono Project.
You can read them online, get PDF versions or get the XML sources.
HTML Format (read it online)
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
For <a href="mono-beginning-windows/t1.html">Microsoft Windows</a>
PDF Format
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
For <a href="mono-beginning-windows.pdf">Microsoft Windows</a>
XML Source
For <a href="mono-beginning.xml">RPM Linux based systems</a>
For <a href="mono-beginning-windows.xml">Microsoft Windows</a>
Currently Hinne is working on a Mono Tools HOWTO. Which will be
very useful for the hackers that would like to get in touch with
Mono and Jaime is working out a Mono Beginning HOWTO for Debian
users.
You can <a href="mono-beginning/t1.html">Read it online</a>,
download a <a href="mono-beginning.pdf">PDF</a> version, or get the
<a href="mono-beginning.xml">source code</a> for it.
@@ -1,3 +1,8 @@
2002-08-14 Cesar Octavio Lopez Nataren <[email protected]>
* regex.cs: Added the ctr for ISerializable implementation and
implemented the GetObjectData function.
2002-07-30 Juli Mallett <[email protected]>
* regex.cs: Fixed bug where the expression would not be
@@ -172,6 +172,12 @@ namespace System.Text.RegularExpressions {
}
}
protected Regex (SerializationInfo info, StreamingContext context) :
this (info.GetString ("pattern"),
(RegexOptions) info.GetValue ("options", typeof (RegexOptions))) {
}
// public instance properties
public RegexOptions Options {
@@ -335,9 +341,9 @@ namespace System.Text.RegularExpressions {
}
// ISerializable interface
public void GetObjectData (SerializationInfo info, StreamingContext context) {
throw new Exception ("Not implemented.");
public virtual void GetObjectData (SerializationInfo info, StreamingContext context) {
info.AddValue ("pattern", this.ToString (), typeof (string));
info.AddValue ("options", this.Options, typeof (RegexOptions));
}
// internal
@@ -1,23 +0,0 @@
AssemblyBuilder.cs
AssemblyBuilderAccess.cs
ConstructorBuilder.cs
EventToken.cs
FieldToken.cs
FlowControl.cs
ILGenerator.cs
Label.cs
MethodToken.cs
ModuleBuilder.cs
OpCode.cs
OpCodes.cs
OpCodeType.cs
OperandType.cs
PackingSize.cs
ParameterToken.cs
PEFileKinds.cs
PropertyToken.cs
SignatureToken.cs
StackBehaviour.cs
StringToken.cs
TypeBuilder.cs
TypeToken.cs
@@ -1,25 +0,0 @@
Assembly.cs
AssemblyNameFlags.cs
BindingFlags.cs
CallingConventions.cs
ConstructorInfo.cs
DefaultMemberAttribute.cs
EventAttributes.cs
EventInfo.cs
FieldAttributes.cs
FieldInfo.cs
ICustomAttributeProvider.cs
MemberFilter.cs
MemberInfo.cs
MemberTypes.cs
MethodAttributes.cs
MethodBase.cs
MethodImplAttributes.cs
MethodInfo.cs
Module.cs
ParameterAttributes.cs
PropertyAttributes.cs
PropertyInfo.cs
ResourceAttributes.cs
ResourceLocation.cs
TypeAttributes.cs
@@ -1,3 +1,8 @@
2002-08-14 Cesar Octavio Lopez Nataren <[email protected]>
* SoapFault.cs: Added the ctr for ISerializable implementation and
implemented GetObjectData.
2002-07-30 Duncan Mak <[email protected]>
* ServerFault.cs:
@@ -25,6 +25,13 @@ namespace System.Runtime.Serialization.Formatters {
throw new NotImplementedException ();
}
public SoapFault (SerializationInfo info, StreamingContext context)
{
FaultCode = info.GetString ("faultcode");
FaultString = info.GetString ("faultstring");
Detail = info.GetValue ("detail", typeof (object));
}
public SoapFault (string faultCode, string faultString,
string faultActor, ServerFault serverFault)
{
@@ -58,7 +65,9 @@ namespace System.Runtime.Serialization.Formatters {
public void GetObjectData (SerializationInfo info,
StreamingContext context)
{
throw new NotImplementedException ();
info.AddValue ("faultcode", FaultCode, typeof (string));
info.AddValue ("faultstring", FaultString, typeof (string));
info.AddValue ("detail", Detail, typeof (object));
}
}
}
@@ -1,3 +1,11 @@
2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* FormatterServices.cs:a implemented GetSerializableMembers ().
2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* FormatterServices.cs: New file with some implementation.
2002-08-16 Dietmar Maurer <[email protected]>
* SerializationInfo.cs: special case for null values.
@@ -0,0 +1,133 @@
//
// System.Runtime.Serialization.FormatterServices
//
// Authors:
// Gonzalo Paniagua Javier ([email protected])
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
//
using System;
using System.Collections;
using System.Reflection;
namespace System.Runtime.Serialization
{
public sealed class FormatterServices
{
private const BindingFlags fieldFlags = BindingFlags.Public |
BindingFlags.Instance |
BindingFlags.NonPublic |
BindingFlags.DeclaredOnly;
private FormatterServices ()
{
}
public static object [] GetObjectData (object obj, MemberInfo [] members)
{
if (obj == null)
throw new ArgumentNullException ("obj");
if (members == null)
throw new ArgumentNullException ("members");
int n = members.Length;
object [] result = new object [n];
for (int i = 0; i < n; i++) {
MemberInfo member = members [i];
if (member == null)
throw new ArgumentNullException (String.Format ("members[{0}]", i));
if (member.MemberType != MemberTypes.Field)
throw new SerializationException (
String.Format ("members [{0}] is not a field.", i));
FieldInfo fi = member as FieldInfo; //FIXME: Can fi be null?
result [i] = fi.GetValue (obj);
}
return result;
}
public static MemberInfo [] GetSerializableMembers (Type type)
{
StreamingContext st = new StreamingContext (StreamingContextStates.All);
return GetSerializableMembers (type, st);
}
public static MemberInfo [] GetSerializableMembers (Type type, StreamingContext context)
{
if (type == null)
throw new ArgumentNullException ("type");
//FIXME: context?
ArrayList fields = new ArrayList ();
Type t = type;
while (t != null) {
GetFields (t, fields);
t = t.BaseType;
}
MemberInfo [] result = new MemberInfo [fields.Count];
fields.CopyTo (result);
return result;
}
private static void GetFields (Type type, ArrayList fields)
{
FieldInfo [] fs = type.GetFields (fieldFlags);
foreach (FieldInfo field in fs)
if (!(field.IsNotSerialized))
fields.Add (member);
}
public static Type GetTypeFromAssembly (Assembly assem, string name)
{
if (assem == null)
throw new ArgumentNullException ("assem");
if (name == null)
throw new ArgumentNullException ("name");
return assem.GetType (name);
}
[MonoTODO]
public static object GetUninitializedObject (Type type)
{
throw new NotImplementedException ();
}
public static object PopulateObjectMembers (object obj, MemberInfo [] members, object [] data)
{
if (obj == null)
throw new ArgumentNullException ("obj");
if (members == null)
throw new ArgumentNullException ("members");
if (data == null)
throw new ArgumentNullException ("data");
int length = members.Length;
if (length != data.Length)
throw new ArgumentException ("different length in members and data");
for (int i = 0; i < length; i++) {
MemberInfo member = members [i];
if (member == null)
throw new ArgumentNullException (String.Format ("members[{0}]", i));
if (member.MemberType != MemberTypes.Field)
throw new SerializationException (
String.Format ("members [{0}] is not a field.", i));
FieldInfo fi = member as FieldInfo; //FIXME: can fi be null?
fi.SetValue (obj, data [i]);
}
return obj;
}
}
}
+5
View File
@@ -1,3 +1,8 @@
2002-08-14 Cesar Octavio Lopez Nataren <[email protected]>
* WeakReference.cs: Changed the constructor and GetObjectData
method needed for ISerializable implementation in order to be
compatible with SOAP generated by MS.
Wed Aug 14 17:34:07 CEST 2002 Paolo Molaro <[email protected]>
+9 -14
View File
@@ -53,10 +53,8 @@ namespace System
if (info == null)
throw new ArgumentNullException ("info");
this.isLongReference = info.GetBoolean("IsLongReference");
//TODO: How to load the exact type?
//Does that matter? No idea :(
Object target = info.GetValue("TargetObject",typeof(System.Object));
this.isLongReference = info.GetBoolean ("TrackResurrection");
Object target = info.GetValue ("TrackedObject", typeof (System.Object));
AllocateHandle(target);
}
@@ -99,20 +97,17 @@ namespace System
gcHandle.Free();
}
//TODO
public virtual void GetObjectData(SerializationInfo info,StreamingContext context)
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
throw new ArgumentNullException ("info");
info.AddValue("IsLongReference",this.isLongReference);
try
{
info.AddValue("TargetObject",Target);
}
catch(Exception)
{
info.AddValue("TargetObject",null);
info.AddValue ("TrackResurrection", TrackResurrection);
try {
info.AddValue ("TrackedObject", Target);
} catch(Exception) {
info.AddValue("TrackedObject",null);
}
}
}
+33 -6
View File
@@ -1,9 +1,36 @@
* Mono for beginners
Hinne Hettema has provided us a beautiful and complete
document on how to obtain, install and test Mono on
a Linux system.
Hinne Hettema and Jaime Anguiano Olarra are providing us with
nice and complete set of documents (HOWTOs) about how to install,
configure, run and test the software developed by the Mono Project.
You can read them online, get PDF versions or get the XML sources.
HTML Format (read it online)
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
For <a href="mono-beginning-windows/t1.html">Microsoft Windows</a>
PDF Format
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
For <a href="mono-beginning-windows.pdf">Microsoft Windows</a>
XML Source
For <a href="mono-beginning.xml">RPM Linux based systems</a>
For <a href="mono-beginning-windows.xml">Microsoft Windows</a>
Currently Hinne is working on a Mono Tools HOWTO. Which will be
very useful for the hackers that would like to get in touch with
Mono and Jaime is working out a Mono Beginning HOWTO for Debian
users.
You can <a href="mono-beginning/t1.html">Read it online</a>,
download a <a href="mono-beginning.pdf">PDF</a> version, or get the
<a href="mono-beginning.xml">source code</a> for it.