[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Mess
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Messaging CallContext.cs,NONE,1.1 Header.cs,NONE,1.1 HeaderHandler.cs,NONE,1.1 ILogicalThreadAffinative.cs,NONE,1.1 IMessage.cs,NONE,1.1 IMessageCtrl.cs,NONE,1.1 IMessageSink.cs,NONE,1.1 IMethodCallMessage.cs,NONE,1.1 IMethodMessage.cs,NONE,1.1 IMethodReturnMessage.cs,NONE,1.1 IRemotingFormatter.cs,NONE,1.1 LogicalCallContext.cs,NONE,1.1 MessageSurrogateFilter.cs,NONE,1.1 OneWayAttribute.cs,NONE,1.1 RemotingSurrogateSelector.cs,NONE,1.1 ReturnMessage.cs,NONE,1.1 |
Date: |
Thu, 17 Apr 2003 06:36:12 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Messaging
In directory
subversions:/tmp/cvs-serv31157/runtime/System/Runtime/Remoting/Messaging
Added Files:
CallContext.cs Header.cs HeaderHandler.cs
ILogicalThreadAffinative.cs IMessage.cs IMessageCtrl.cs
IMessageSink.cs IMethodCallMessage.cs IMethodMessage.cs
IMethodReturnMessage.cs IRemotingFormatter.cs
LogicalCallContext.cs MessageSurrogateFilter.cs
OneWayAttribute.cs RemotingSurrogateSelector.cs
ReturnMessage.cs
Log Message:
Stub out a large number of classes under the "System.Runtime.Remoting"
namespace; add the "CONFIG_REMOTING" define to selection compilation of
remoting.
--- NEW FILE ---
/*
* CallContext.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.CallContext" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
[Serializable]
public sealed class CallContext
{
// We cannot instantiate this class.
private CallContext() {}
// Free the contents of a named data slot.
[TODO]
public static void FreeNamedDataSlot(String name)
{
// TODO
}
// Get the data in a particular named data slot.
[TODO]
public static Object GetData(String name)
{
// TODO
return null;
}
// Get the headers that were sent with the method call.
[TODO]
public static Header[] GetHeaders()
{
// TODO
return null;
}
// Set the contents of a named data slot.
[TODO]
public static void SetData(String name, Object value)
{
// TODO
}
// Set the headers to be sent along with the method call.
[TODO]
public static void SetHeaders(Header[] headers)
{
// TODO
}
}; // class CallContext
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* Header.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.Header" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
[Serializable]
public class Header
{
// Internal state.
private String name;
private Object value;
private bool mustUnderstand;
private String headerNamespace;
// Constructor.
public Header(String _Name, Object _Value)
{
this.name = _Name;
this.value = _Value;
}
public Header(String _Name, Object _Value, bool _MustUnderstand)
{
this.name = _Name;
this.value = _Value;
this.mustUnderstand = _MustUnderstand;
}
public Header(String _Name, Object _Value, bool _MustUnderstand,
String _HeaderNamespace)
{
this.name = _Name;
this.value = _Value;
this.mustUnderstand = _MustUnderstand;
this.headerNamespace = _HeaderNamespace;
}
// Get the properties of this object.
public String HeaderNamespace
{
get
{
return headerNamespace;
}
}
public bool MustUnderstand
{
get
{
return mustUnderstand;
}
}
public String Name
{
get
{
return name;
}
}
public Object Value
{
get
{
return value;
}
}
}; // class Header
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* HeaderHandler.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.HeaderHandler" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
public delegate Object HeaderHandler(Header[] headers);
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* ILogicalThreadAffinative.cs - Implementation of the
*
"System.Runtime.Remoting.Messaging.ILogicalThreadAffinative" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
public interface ILogicalThreadAffinative
{
// Doesn't have any members.
}; // interface ILogicalThreadAffinative
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* IMessage.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.IMessage" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
using System.Collections;
public interface IMessage
{
// Get the message's properties.
IDictionary Properties { get; }
}; // interface IMessage
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* IMessageCtrl.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.IMessageCtrl" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
public interface IMessageCtrl
{
// Cancel the message.
void Cancel(int msToCancel);
}; // interface IMessageCtrl
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* IMessageSink.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.IMessageSink" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
public interface IMessageSink
{
// Get the next message sink in the chain.
IMessageSink NextSink { get; }
// Process a message asynchronously.
IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink);
// Process a message synchronously.
IMessage SyncProcessMessage(IMessage msg);
}; // interface IMessageSink
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* IMethodCallMessage.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.IMethodCallMessage"
class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
public interface IMethodCallMessage : IMethodMessage, IMessage
{
// Get the number of input arguments.
int InArgCount { get; }
// Get the input arguments.
Object[] InArgs { get; }
// Get a specified input argument.
Object GetInArg(int argNum);
// Get the name of a specified input argument.
String GetInArgName(int index);
}; // interface IMethodCallMessage
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* IMethodMessage.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.IMethodMessage"
class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
using System.Reflection;
public interface IMethodMessage : IMessage
{
// Get the number of arguments.
int ArgCount { get; }
// Get the argument values.
Object[] Args { get; }
// Determine if the message has varargs.
bool HasVarArgs { get; }
// Get the logical calling context for this message.
LogicalCallContext LogicalCallContext { get; }
// Get the method base.
MethodBase MethodBase { get; }
// Get the name of the method.
String MethodName { get; }
// Get the method's signature.
Object MethodSignature { get; }
// Get the name of the called object's type.
String TypeName { get; }
// Get the called object's URI.
String Uri { get; }
// Get a specific argument.
Object GetArg(int argNum);
// Get the name of a specific argument.
String GetArgName(int index);
}; // interface IMethodMessage
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* IMethodReturnMessage.cs - Implementation of the
*
"System.Runtime.Remoting.Messaging.IMethodReturnMessage" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
public interface IMethodReturnMessage : IMethodMessage, IMessage
{
// Get the exception that was thrown.
Exception Exception { get; }
// Get the number of output arguments.
int OutArgCount { get; }
// Get the output arguments.
Object[] OutArgs { get; }
// Get the method's return value.
Object ReturnValue { get; }
// Get a specified output argument.
Object GetOutArg(int argNum);
// Get the name of a specified output argument.
String GetOutArgName(int index);
}; // interface IMethodReturnMessage
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* IRemotingFormatter.cs - Implementation of the
*
"System.Runtime.Remoting.Messaging.Messaging.IRemotingFormatter" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
using System.IO;
using System.Runtime.Serialization;
public interface IRemotingFormatter : IFormatter
{
// Deserialize an RPC call from a stream.
Object Deserialize(Stream serializationStream, HeaderHandler handler);
// Serialize an RPC call onto a stream.
void Serialize(Stream serializationStream, Object graph, Header[]
headers);
}; // interface IRemotingFormatter
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* LogicalCallContext.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.LogicalCallContext" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
using System.Collections;
using System.Runtime.Serialization;
[Serializable]
public class LogicalCallContext : ISerializable, ICloneable
{
// Internal state.
private Hashtable table;
// Constructors.
internal LogicalCallContext() {}
internal LogicalCallContext(Hashtable clone)
{
table = clone;
}
[TODO]
internal LogicalCallContext(SerializationInfo info,
StreamingContext context)
{
// TODO
}
// Determine if this context contains information.
public bool HasInfo
{
get
{
return (table != null && table.Count !=
0);
}
}
// Implement the ICloneable interface.
public Object Clone()
{
if(table != null)
{
return new
LogicalCallContext((Hashtable)(table.Clone()));
}
else
{
return new LogicalCallContext();
}
}
// Free a particular named data slot.
public void FreeNamedDataSlot(String name)
{
if(table != null)
{
table.Remove(name);
}
}
// Get the data in a particular named data slot.
public Object GetData(String name)
{
if(table != null)
{
return table[name];
}
else
{
return null;
}
}
// Implement the ISerializable interface.
[TODO]
public void GetObjectData(SerializationInfo info, StreamingContext
context)
{
// TODO
}
// Set the data in a particular named data slot.
public void SetData(String name, Object value)
{
if(table != null)
{
table[name] = value;
}
else
{
table = new Hashtable();
table[name] = value;
}
}
}; // class LogicalCallContext
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* MessageSurrogateFilter.cs - Implementation of the
*
"System.Runtime.Remoting.Messaging.MessageSurrogateFilter" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
public delegate bool MessageSurrogateFilter(String key, Object value);
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* OneWayAttribute.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.OneWayAttribute"
class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
[AttributeUsage(AttributeTargets.Method)]
public class OneWayAttribute : Attribute
{
// Constructor.
public OneWayAttribute() {}
}; // class OneWayAttribute
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* RemotingSurrogateSelector.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.RemotingSurrogateSelector"
class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
using System.Runtime.Serialization;
public class RemotingSurrogateSelector : ISurrogateSelector
{
// Internal state.
private MessageSurrogateFilter filter;
private ISurrogateSelector next;
private Object rootObject;
// Constructor.
[TODO]
public RemotingSurrogateSelector()
{
// TODO
}
// Get or set the message surrogate filter.
public MessageSurrogateFilter Filter
{
get
{
return filter;
}
set
{
filter = value;
}
}
// Implement the ISurrogateSelector interface.
[TODO]
public void ChainSelector(ISurrogateSelector selector)
{
// TODO
}
public ISurrogateSelector GetNextSelector()
{
return next;
}
[TODO]
public ISerializationSurrogate GetSurrogate
(Type type, StreamingContext context,
out ISurrogateSelector selector)
{
// TODO
selector = null;
return null;
}
// Get the root of the object graph.
public Object GetRootObject()
{
return rootObject;
}
// Set the root of the object graph.
public void SetRootObject(Object obj)
{
if(obj == null)
{
throw new ArgumentNullException("obj");
}
rootObject = obj;
}
// Tell this selector to use the SOAP format.
[TODO]
public virtual void UseSoapFormat()
{
// TODO
}
}; // class RemotingSurrogateSelector
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
--- NEW FILE ---
/*
* ReturnMessage.cs - Implementation of the
* "System.Runtime.Remoting.Messaging.ReturnMessage" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Runtime.Remoting.Messaging
{
#if CONFIG_REMOTING
using System.Collections;
using System.Reflection;
public class ReturnMessage : IMethodReturnMessage, IMethodMessage, IMessage
{
// Internal state.
private Exception exception;
private IMethodCallMessage mcm;
private Object ret;
private Object[] outArgs;
private int outArgsCount;
private LogicalCallContext callCtx;
// Constructor.
public ReturnMessage(Exception e, IMethodCallMessage mcm)
{
this.exception = e;
this.mcm = mcm;
}
public ReturnMessage(Object ret, Object[] outArgs, int outArgsCount,
LogicalCallContext callCtx,
IMethodCallMessage mcm)
{
this.ret = ret;
this.outArgs = outArgs;
this.outArgsCount = outArgsCount;
this.callCtx = callCtx;
this.mcm = mcm;
}
// Implement the IMethodReturnMessage interface.
public Exception Exception
{
get
{
return exception;
}
}
public int OutArgCount
{
get
{
return outArgsCount;
}
}
public Object[] OutArgs
{
get
{
return outArgs;
}
}
public Object ReturnValue
{
get
{
return ret;
}
}
public Object GetOutArg(int argNum)
{
return outArgs[argNum];
}
public String GetOutArgName(int index)
{
// We don't have argument names available.
return null;
}
// Implement the IMethodMessage interface.
public int ArgCount
{
get
{
return mcm.ArgCount;
}
}
public Object[] Args
{
get
{
return mcm.Args;
}
}
public bool HasVarArgs
{
get
{
return mcm.HasVarArgs;
}
}
public LogicalCallContext LogicalCallContext
{
get
{
if(callCtx != null)
{
return callCtx;
}
else
{
return mcm.LogicalCallContext;
}
}
}
public MethodBase MethodBase
{
get
{
return mcm.MethodBase;
}
}
public String MethodName
{
get
{
return mcm.MethodName;
}
}
public Object MethodSignature
{
get
{
return mcm.MethodSignature;
}
}
public String TypeName
{
get
{
return mcm.TypeName;
}
}
public String Uri
{
get
{
return mcm.Uri;
}
}
public Object GetArg(int argNum)
{
return mcm.GetArg(argNum);
}
public String GetArgName(int index)
{
return mcm.GetArgName(index);
}
// Implement the IMessage interface.
public IDictionary Properties
{
get
{
return mcm.Properties;
}
}
}; // interface IMethodReturnMessage
#endif // CONFIG_REMOTING
}; // namespace System.Runtime.Remoting.Messaging
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Messaging CallContext.cs,NONE,1.1 Header.cs,NONE,1.1 HeaderHandler.cs,NONE,1.1 ILogicalThreadAffinative.cs,NONE,1.1 IMessage.cs,NONE,1.1 IMessageCtrl.cs,NONE,1.1 IMessageSink.cs,NONE,1.1 IMethodCallMessage.cs,NONE,1.1 IMethodMessage.cs,NONE,1.1 IMethodReturnMessage.cs,NONE,1.1 IRemotingFormatter.cs,NONE,1.1 LogicalCallContext.cs,NONE,1.1 MessageSurrogateFilter.cs,NONE,1.1 OneWayAttribute.cs,NONE,1.1 RemotingSurrogateSelector.cs,NONE,1.1 ReturnMessage.cs,NONE,1.1,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001 - New directory
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Metadata Makefile,NONE,1.1 SoapAttribute.cs,NONE,1.1 SoapFieldAttribute.cs,NONE,1.1 SoapMethodAttribute.cs,NONE,1.1 SoapOption.cs,NONE,1.1 SoapParameterAttribute.cs,NONE,1.1 SoapTypeAttribute.cs,NONE,1.1 XmlFieldOrderOption.cs,NONE,1.1
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001 - New directory
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Metadata Makefile,NONE,1.1 SoapAttribute.cs,NONE,1.1 SoapFieldAttribute.cs,NONE,1.1 SoapMethodAttribute.cs,NONE,1.1 SoapOption.cs,NONE,1.1 SoapParameterAttribute.cs,NONE,1.1 SoapTypeAttribute.cs,NONE,1.1 XmlFieldOrderOption.cs,NONE,1.1
- Index(es):