* RemotingServices.cs: Added method to help support Async messages.
* RemotingConfiguration.cs: Implemented property ProcessID.
svn path=/trunk/mcs/; revision=13476
+2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
+
+ * ObjRef.cs: Renamed ChannelInfoStore to ChannelInfo (match MS.NET)
+ * RemotingServices.cs: Added method to help support Async messages.
+ * RemotingConfiguration.cs: Implemented property ProcessID.
+
2003-03-24 Lluis Sanchez Gual <lluis@ideary.com>
* RemotingServices.cs: Fixed bug #39915
typeInfo = new TypeInfo(type);
if (remoteChannelData != null)
- channel_info = new ChannelInfoStore (remoteChannelData);
+ channel_info = new ChannelInfo (remoteChannelData);
flags |= WellKnowObjectRef;
}
internal void UpdateChannelInfo()
{
- channel_info = new ChannelInfoStore ();
+ channel_info = new ChannelInfo ();
}
internal Type ServerType
{
static string applicationID = null;
static string applicationName = null;
- static string processId = null;
static string configFile = "";
static MiniParser parser = null;
+ static string processGuid = null;
static Hashtable wellKnownClientEntries = new Hashtable();
static Hashtable activatedClientEntries = new Hashtable();
public static string ProcessId
{
- get {
- processId = AppDomain.CurrentDomain.SetupInformation.ApplicationName;
- return processId;
+ get {
+ if (processGuid == null)
+ processGuid = AppDomain.GetProcessGuid ();
+
+ return processGuid;
}
}
+
// public methods
public static void Configure (string filename)
public static bool IsOneWay(MethodBase method)
{
+ // TODO: use internal call for better performance
object[] atts = method.GetCustomAttributes (typeof (OneWayAttribute), false);
return atts.Length > 0;
}
+ public static bool IsAsyncMessage(IMessage msg)
+ {
+ if (! (msg is MonoMethodMessage)) return false;
+ else if (((MonoMethodMessage)msg).IsAsync) return true;
+ else if (IsOneWay (((MonoMethodMessage)msg).MethodBase)) return true;
+ else return false;
+ }
+
public static void SetObjectUriForMarshal(MarshalByRefObject obj, string uri)
{
if (IsTransparentProxy (obj)) throw new RemotingException ("SetObjectUriForMarshal method should only be called for MarshalByRefObjects that exist in the current AppDomain.");