Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,213 @@
//
// System.Runtime.Remoting.Channels.AggregateDictionary.cs
//
// Author: Lluis Sanchez Gual (lluis@ximian.com)
//
// 2002 (C) Copyright, Novell, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
namespace System.Runtime.Remoting.Channels
{
[System.Runtime.InteropServices.ComVisible (true)]
internal class AggregateDictionary: IDictionary
{
IDictionary[] dictionaries;
ArrayList _values;
ArrayList _keys;
public AggregateDictionary (IDictionary[] dics)
{
dictionaries = dics;
}
public bool IsFixedSize
{
get { return true; }
}
public bool IsReadOnly
{
get { return true; }
}
public object this [object key]
{
get
{
foreach (IDictionary dic in dictionaries)
if (dic.Contains (key)) return dic [key];
return null;
}
set
{
throw new NotSupportedException ();
}
}
public ICollection Keys
{
get
{
if (_keys != null) return _keys;
_keys = new ArrayList ();
foreach (IDictionary dic in dictionaries)
_keys.AddRange (dic.Keys);
return _keys;
}
}
public ICollection Values
{
get
{
if (_values != null) return _values;
_values = new ArrayList ();
foreach (IDictionary dic in dictionaries)
_values.AddRange (dic.Values);
return _values;
}
}
public void Add (object key, object value)
{
throw new NotSupportedException ();
}
public void Clear ()
{
throw new NotSupportedException ();
}
public bool Contains (object ob)
{
foreach (IDictionary dic in dictionaries)
if (dic.Contains (ob)) return true;
return false;
}
public IDictionaryEnumerator GetEnumerator ()
{
return new AggregateEnumerator (dictionaries);
}
IEnumerator IEnumerable.GetEnumerator ()
{
return new AggregateEnumerator (dictionaries);
}
public void Remove (object ob)
{
throw new NotSupportedException ();
}
public void CopyTo (Array array, int index)
{
foreach (object ob in this)
array.SetValue (ob, index++);
}
public int Count
{
get
{
int c = 0;
foreach (IDictionary dic in dictionaries)
c += dic.Count;
return c;
}
}
public bool IsSynchronized
{
get { return false; }
}
public object SyncRoot
{
get { return this; }
}
}
internal class AggregateEnumerator: IDictionaryEnumerator
{
IDictionary[] dictionaries;
int pos = 0;
IDictionaryEnumerator currente;
public AggregateEnumerator (IDictionary[] dics)
{
dictionaries = dics;
Reset ();
}
public DictionaryEntry Entry
{
get { return currente.Entry; }
}
public object Key
{
get { return currente.Key; }
}
public object Value
{
get { return currente.Value; }
}
public object Current
{
get { return currente.Current; }
}
public bool MoveNext ()
{
if (pos >= dictionaries.Length) return false;
if (!currente.MoveNext())
{
pos++;
if (pos >= dictionaries.Length) return false;
currente = dictionaries [pos].GetEnumerator ();
return MoveNext ();
}
return true;
}
public void Reset ()
{
pos = 0;
if (dictionaries.Length > 0)
currente = dictionaries [0].GetEnumerator ();
}
}
}

View File

@@ -0,0 +1,137 @@
//
// System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties.cs
//
// Author: Rodrigo Moya (rodrigo@ximian.com)
// Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
namespace System.Runtime.Remoting.Channels
{
[System.Runtime.InteropServices.ComVisible (true)]
public abstract class BaseChannelObjectWithProperties :
IDictionary, ICollection, IEnumerable
{
Hashtable table;
protected BaseChannelObjectWithProperties ()
{
table = new Hashtable ();
}
public virtual int Count
{
get { return table.Count; }
}
public virtual bool IsFixedSize
{
get { return true; }
}
public virtual bool IsReadOnly
{
get { return false; }
}
public virtual bool IsSynchronized
{
get { return false; }
}
//
// This is explicitly not implemented.
//
public virtual object this [object key]
{
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
public virtual ICollection Keys
{
get { return table.Keys; }
}
public virtual IDictionary Properties
{
get { return this as IDictionary; }
}
public virtual object SyncRoot
{
get { return this; }
}
public virtual ICollection Values
{
get { return table.Values; }
}
public virtual void Add (object key, object value)
{
// .NET says this method must not implemented
throw new NotSupportedException ();
}
public virtual void Clear ()
{
// .NET says this method must not implemented
throw new NotSupportedException ();
}
public virtual bool Contains (object key)
{
return table.Contains (key);
}
public virtual void CopyTo (Array array, int index)
{
// .NET says this method must not implemented
throw new NotSupportedException ();
}
public virtual IDictionaryEnumerator GetEnumerator ()
{
return table.GetEnumerator ();
}
IEnumerator IEnumerable.GetEnumerator ()
{
return table.GetEnumerator ();
}
public virtual void Remove (object key)
{
// .NET says this method must not implemented
throw new NotSupportedException ();
}
}
}

View File

@@ -0,0 +1,46 @@
//
// System.Runtime.Remoting.Channels.BaseChannelSyncWithProperties.cs
//
// Author: Rodrigo Moya (rodrigo@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.Remoting.Channels
{
[System.Runtime.InteropServices.ComVisible (true)]
public abstract class BaseChannelSinkWithProperties
: BaseChannelObjectWithProperties
{
protected BaseChannelSinkWithProperties ()
: base ()
{
}
}
}

View File

@@ -0,0 +1,60 @@
//
// System.Runtime.Remoting.Channels.BaseChannelWithProperties.cs
//
// Author: Rodrigo Moya (rodrigo@ximian.com)
// Lluis Sanchez Gual (lluis@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
namespace System.Runtime.Remoting.Channels
{
[System.Runtime.InteropServices.ComVisible (true)]
public abstract class BaseChannelWithProperties :
BaseChannelObjectWithProperties
{
protected IChannelSinkBase SinksWithProperties;
protected BaseChannelWithProperties ()
{
}
public override IDictionary Properties
{
get
{
if (SinksWithProperties == null || SinksWithProperties.Properties == null)
return base.Properties;
else {
IDictionary[] dics = new IDictionary [] { base.Properties, SinksWithProperties.Properties };
return new AggregateDictionary (dics);
}
}
}
}
}

View File

@@ -0,0 +1,327 @@
2008-12-01 Kornél Pál <kornelpal@gmail.com>
* CrossAppDomainChannel.cs: Make _ContextID an object that fixes bug #422491.
Credits to Robert Jordan and Steffen Enni.
2008-07-02 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* IChannelReceiver.cs:
* ClientChannelSinkStack.cs:
* ChannelDataStore.cs: Fix parameter names
2007-08-22 Atsushi Enomoto <atsushi@ximian.com>
* ChannelServices.cs : implement ensureSecurity support in
RegisterChannel(IChannel,bool). Note that we don't have secure
channels in Sys.Runtime.Remoting.dll yet.
2007-08-15 Atsushi Enomoto <atsushi@ximian.com>
* ChannelServices.cs BaseChannelObjectWithProperties.cs
ISecurableChannel.cs : cosmetic 2.0 API fixes.
2007-06-05 Robert Jordan <robertj@gmx.net>
* ChannelServices.cs (CreateClientChannelSinkChain):
Provide the URI when channel data is not IChannelDataStore,
otherwise the channels won't be able to obtain the URI.
Fixes #81811.
2007-02-12 Lluis Sanchez Gual <lluis@novell.com>
* ChannelServices.cs: Added conditional calling of StartListener,
to keep old software compatible with mono.
2006-12-18 Lluis Sanchez Gual <lluis@novell.com>
* ChannelServices.cs: Don't call StartListening for registered
channels (MS.NET doesn't do it).
2006-11-22 Lluis Sanchez Gual <lluis@novell.com>
* ChannelServices.cs: When creating a client sink chain by calling
CreateMessageSink, provide a null URL if there is channel data.
Needed because some third party channels check for a null URL before
looking into the channel data.
2005-11-05 Robert Jordan <robertj@gmx.net>
* ISecurableChannel.cs: Added.
2005-10-17 Lluis Sanchez Gual <lluis@novell.com>
* ChannelServices.cs: RegisteredChannels should not include the
hidden cross app domain channel. Fixes bug #76454.
2005-06-01 Lluis Sanchez Gual <lluis@novell.com>
* TransportHeaders.cs: This collection turns out to be case insensitive
AND culture insensitive.
2005-05-31 Lluis Sanchez Gual <lluis@novell.com>
* TransportHeaders.cs: This collection turns out to be case insensitive.
2005-03-10 Zoltan Varga <vargaz@freemail.hu>
* CrossAppDomainChannel.cs: Remove call to ResetDataStoreStatus ().
2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
* CrossAppDomainChannel.cs: Added getter for the target domain Id.
2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
* CrossAppDomainChannel.cs: In CreateMessageSink, ignore the url
parameter, it is not needed.
2004-07-02 Lluis Sanchez Gual <lluis@novell.com>
* ChannelServices.cs: In RegisterChannel, ignore name colisions if the
channel name is "". This fixes bug #61592.
2004-07-02 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: In UnregisterChannel, look for registered channels
using reference compares.
2004-06-15 Gert Driesen <drieseng@users.sourceforge.net>
* TransportHeaders.cs: added TODO for serialization
2004-06-10 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: ExceptionFilterSink should be internal.
2004-05-14 Lluis Sanchez Gual <lluis@ximian.com>
* AggregateDictionary.cs: Moved to System.Runtime.Remoting.Channels
namespace.
* BaseChannelObjectWithProperties.cs: format.
* BaseChannelWithProperties.cs: Implemented.
2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Configure delayed load channels when a chanel lookup
fails.
2004-04-26 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Implemented partial support for CustomErrors
configuraiton option.
2003-11-17 Lluis Sanchez Gual <lluis@ximian.com>
* GetChannelSinkProperties.cs: Implemented GetChannelSinkProperties().
* ServerDispatchSink.cs: Removed some TODOs.
* AggregateDictionary.cs: Added.
2003-11-16 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Removed some TODOs. Implemented AsyncDispatchMessage.
2003-11-13 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Catch errors when creating configured channels.
2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Added support for creating channels from configuration
files. Added some locks.
* SinkProviderData.cs: Implemented.
2003-11-11 Lluis Sanchez Gual <lluis@ximian.com>
* CrossAppDomainChannel.cs: Implemented support for async calls.
* ClientChannelSinkStack.cs, ServerDispatchSinkProvider.cs: Removed some TODOs
2003-11-01 Zoltan Varga <vargaz@freemail.hu>
* CrossAppDomainChannel.cs (SyncProcessMessage): Use the new
InvokeInDomain function instead of calling SetDomain.
2003-10-23 Lluis Sanchez Gual <lluis@ximian.com>
* CrossAppDomainChannel.cs: Before the domain switch, save and reset
thread's datastore. Restore it on return. This fixes bug #49774.
2003-09-11 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Call context management moved to RemotingServices.
2003-08-25 Lluis Sanchez Gual <lluis@ximian.com>
* ClientChannelSinkStack.cs: Implemented DispatchException.
2003-08-14 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Set call context info for the incoming
remote call, and restore the context after the call.
2003-07-28 Duncan Mak <duncan@ximian.com>
* TransportHeaders.cs: Added Serializable attribute.
* ClientChannelSinkStack.cs: Added no-param constructor.
2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
* ChannelServices.cs: Implemented GetChannel() and GetUrlsForObject()
2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelDataStore.cs: renamed some members to match MS.NET.
* ChannelServices.cs: renamed ChannelInfoStore an its members to match MS.NET.
* CrossAppDomainChannel.cs: Renamed CrossAppDomainChannelData to match MS.NET.
Added processId property to CrossAppDomainData. Now it is checked in CreateSink.
2003-03-15 Lluis Sanchez Gual <lluis@ideary.com>
* CrossAppDomainChannel.cs: fixes bugs #39380 and #39331.
2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelServices.cs: Minor corrections.
* CrossAppDomainChannel.cs: Context is now restored when exiting the domain.
2003-02-18 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelServices.cs: Added static property for getting the CrossContextChannel.
2003-02-05 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelServices.cs: Added new constructor in ChannelInfoStore, that is used by
ObjRef to create a ChannelInfoStore with user provided channel info.
2003-02-05 Lluis Sanchez Gual <lluis@ideary.com>
* CrossAppDomainChannel.cs: Corrected CADSerializer.DeserializeMessage.
Now it uses the method DeserializeMethodResponse to deserialize the message
when the msg is provided.
2003-02-04 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelServices.cs: Modified to work with new types of identities.
2003-02-03 Patrik Torstensson
* CrossAppDomainChannel.cs: Implemented cross appdomain marshalling via cross
app domain messages (smuggling objects between domains)
2002-12-29 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelServices.cs: corrected generation of exception in SyncDispatchMessage.
2002-12-28 Patrik Torstensson
* CrossAppDomainChannel.cs: First version, without support for "going" into the right domain
2002-12-26 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelServices.cs: small correction in CreateClientChannelSinkChain.
* ChannelDataStore.cs: added Serializable attribute.
2002-12-20 Lluis Sanchez Gual <lluis@ideary.com>
* ChannelServices.cs: added internal method for creating client
channel sink. Implemented some other methods.
* ClientChannelSinkStack.cs: implemented most of methods.
* ServerChannelSinkStack.cs: implemented most of methods.
* ChannelSinkStackEntry.cs: added
* ServerDispatchSink.cs: ProcessMessage now forwards messages
to ChannelServices.DispatchMessage
2002-12-06 Duncan Mak <duncan@ximian.com>
* BaseChannelObjectWithProperties.cs :
Implemented the Count, IsFixedSize, IsReadOnly, IsSynchronized,
Keys, Properties, SyncRoot, Values properties.
Implemented the Contains and GetEnumerator methods.
Removed the unnecessary TODO attribute on the constructor, and the
Add method.
* BaseChannelSinkWithProperties.cs (constructor): Implemented by
chaining on to the base constructor.
2002-08-31 Dietmar Maurer <dietmar@ximian.com>
* ChannelDataStore.cs: use a hash to store other keys
2002-08-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* ChannelServices.cs: added private .ctor
2002-08-13 Rodrigo Moya <rodrigo@ximian.com>
* SoapClientFormatterSink.cs:
* SoapServerFormatterSinkProvider.cs:
* SinkProviderData.cs: new classes.
2002-08-10 Rodrigo Moya <rodrigo@ximian.com>
* CommonTransportKeys.cs:
* ServerChannelSinkStack.cs: new classes.
2002-08-05 Rodrigo Moya <rodrigo@ximian.com>
* ChannelServices.cs:
* ChannelDataStore.cs:
* ClientChannelSinkStack.cs: new classes with some implementation.
2002-08-03 Rodrigo Moya <rodrigo@ximian.com>
* BinaryServerFormatterSinkProvider.cs:
* BinaryClientFormatterSinkProvider.cs: new stubs.
2002-08-03 Duncan Mak <duncan@ximian.com>
* BinaryClientFormatterSink.cs:
* IClientChannelSink.cs: Fixed signature for AsyncProcessResponse.
2002-08-01 Rodrigo Moya <rodrigo@ximian.com>
* BinaryClientFormatterSink.cs:
* BaseChannelWithProperties.cs: new stubs.
2002-08-02 Duncan Mak <duncan@ximian.com>
* IChannel.cs:
* IChannelReceiver.cs:
* IChannelReceiverHook.cs:
* IClientChannelSink.cs:
* IClientChannelSinkStack.cs:
* IServerChannelSink.cs:
* IServerChannelSinkProvider.cs:
* IServerChannelSinkStack.cs: Fixed various typos, cut-n-paste
errors.
2002-07-31 Rodrigo Moya <rodrigo@ximian.com>
* BaseChannelSinkWithProperties.cs:
* BaseChannelObjectWithProperties.cs: new stubs.
2002-08-01 Duncan Mak <duncan@ximian.com>
* IChannel.cs:
(Parse): Added.
* BinaryServerFormatterSink.cs:
* SoapServerFormatterSink.cs: Fixed typo.
* IServerChannelSink.cs:
(ProcessMessage): Fixed definition.
2002-07-31 Duncan Mak <duncan@ximian.com>
* BinaryServerFormatterSink.cs:
* SoapServerFormatterSink.cs: Added.
* IChannelReceiverHook.cs:
* IClientFormatterSink.cs: Various compilation fixes.
2002-07-31 Duncan Mak <duncan@ximian.com>
* *.cs: Added all the interfaces in this namespace.
* ServerProcessing.cs: Added.

View File

@@ -0,0 +1,85 @@
//
// System.Runtime.Remoting.Channels.ChannelDataStore.cs
//
// Author: Rodrigo Moya (rodrigo@ximian.com)
// Dietmar Maurer (dietmar@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
namespace System.Runtime.Remoting.Channels
{
[Serializable]
[System.Runtime.InteropServices.ComVisible (true)]
public class ChannelDataStore : IChannelDataStore
{
string[] _channelURIs;
DictionaryEntry[] _extraData;
public ChannelDataStore (string[] channelURIs)
{
_channelURIs = channelURIs;
}
public string[] ChannelUris
{
get {
return _channelURIs;
}
set {
_channelURIs = value;
}
}
public object this[object key]
{
get {
if (_extraData == null) return null;
foreach (DictionaryEntry entry in _extraData)
if (entry.Key.Equals (key)) return entry.Value;
return null;
}
set {
if (_extraData == null)
{
_extraData = new DictionaryEntry [] { new DictionaryEntry (key, value) };
}
else
{
DictionaryEntry[] tmpData = new DictionaryEntry [_extraData.Length + 1];
_extraData.CopyTo (tmpData, 0);
tmpData [_extraData.Length] = new DictionaryEntry (key, value);
_extraData = tmpData;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
//
// System.Runtime.Remoting.ChanelSinkStackEntry.cs
//
// Author: Lluis Sanchez Gual (lsg@ctv.es)
//
// (C) 2002, Lluis Sanchez Gual
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Runtime.Remoting.Channels
{
/// <summary>
/// Used to store sink information in a SinkStack
/// </summary>
internal class ChanelSinkStackEntry
{
public IChannelSinkBase Sink;
public object State;
public ChanelSinkStackEntry Next;
public ChanelSinkStackEntry(IChannelSinkBase sink, object state, ChanelSinkStackEntry next)
{
Sink = sink;
State = state;
Next = next;
}
}
}

View File

@@ -0,0 +1,98 @@
//
// System.Runtime.Remoting.Channels.ClientChannelSinkStack.cs
//
// Author: Rodrigo Moya (rodrigo@ximian.com)
// Lluis Sanchez (lsg@ctv.es)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.IO;
using System.Runtime.Remoting.Messaging;
namespace System.Runtime.Remoting.Channels
{
[System.Runtime.InteropServices.ComVisible (true)]
public class ClientChannelSinkStack : IClientChannelSinkStack, IClientResponseChannelSinkStack
{
// The sink where to send the result of the async call
private IMessageSink _replySink = null;
// The stack. It is a chain of ChanelSinkStackEntry.
ChanelSinkStackEntry _sinkStack = null;
public ClientChannelSinkStack ()
{
}
public ClientChannelSinkStack (IMessageSink replySink)
{
_replySink = replySink;
}
public void AsyncProcessResponse (ITransportHeaders headers, Stream stream)
{
if (_sinkStack == null) throw new RemotingException ("The current sink stack is empty");
ChanelSinkStackEntry stackEntry = _sinkStack;
_sinkStack = _sinkStack.Next;
((IClientChannelSink)stackEntry.Sink).AsyncProcessResponse (this, stackEntry.State, headers, stream);
// Do not call AsyncProcessResponse for each sink in the stack.
// The sink must recursively call IClientChannelSinkStack.AsyncProcessResponse
// after its own processing
}
public void DispatchException (Exception e)
{
DispatchReplyMessage (new ReturnMessage (e, null));
}
public void DispatchReplyMessage (IMessage msg)
{
if (_replySink != null) _replySink.SyncProcessMessage(msg);
}
public object Pop (IClientChannelSink sink)
{
// Pops until the sink is found
while (_sinkStack != null)
{
ChanelSinkStackEntry stackEntry = _sinkStack;
_sinkStack = _sinkStack.Next;
if (stackEntry.Sink == sink) return stackEntry.State;
}
throw new RemotingException ("The current sink stack is empty, or the specified sink was never pushed onto the current stack");
}
public void Push (IClientChannelSink sink, object state)
{
_sinkStack = new ChanelSinkStackEntry (sink, state, _sinkStack);
}
}
}

View File

@@ -0,0 +1,353 @@
//
// System.Runtime.Remoting.Channels.CrossAppDomainChannel.cs
//
// Author: Patrik Torstensson (totte_mono@yahoo.com)
// Lluis Sanchez Gual (lluis@ximian.com)
//
// 2003 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
using System.IO;
using System.Threading;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Contexts;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Reflection;
namespace System.Runtime.Remoting.Channels
{
// Holds the cross appdomain channel data (used to get/create the correct sink)
[Serializable]
internal class CrossAppDomainData
{
// TODO: Add context support
// Required for .NET compatibility
#pragma warning disable 0414
private object _ContextID;
#pragma warning restore
private int _DomainID;
private string _processGuid;
internal CrossAppDomainData(int domainId)
{
_ContextID = (int) 0;
_DomainID = domainId;
_processGuid = RemotingConfiguration.ProcessId;
}
internal int DomainID
{
get { return _DomainID; }
}
internal string ProcessID
{
get { return _processGuid; }
}
}
// Responsible for marshalling objects between appdomains
[Serializable]
internal class CrossAppDomainChannel : IChannel, IChannelSender, IChannelReceiver
{
private const String _strName = "MONOCAD";
private static Object s_lock = new Object();
internal static void RegisterCrossAppDomainChannel()
{
lock (s_lock)
{
// todo: make singleton
CrossAppDomainChannel monocad = new CrossAppDomainChannel();
ChannelServices.RegisterChannel ((IChannel) monocad);
}
}
// IChannel implementation
public virtual String ChannelName
{
get { return _strName; }
}
public virtual int ChannelPriority
{
get { return 100; }
}
public String Parse(String url, out String objectURI)
{
objectURI = url;
return null;
}
// IChannelReceiver
public virtual Object ChannelData
{
get { return new CrossAppDomainData(Thread.GetDomainID()); }
}
public virtual String[] GetUrlsForUri(String objectURI)
{
throw new NotSupportedException("CrossAppdomain channel dont support UrlsForUri");
}
// Dummies
public virtual void StartListening(Object data) {}
public virtual void StopListening(Object data) {}
// IChannelSender
public virtual IMessageSink CreateMessageSink(String url, Object data, out String uri)
{
uri = null;
if (data != null)
{
// Get the data and then get the sink
CrossAppDomainData cadData = data as CrossAppDomainData;
if (cadData != null && cadData.ProcessID == RemotingConfiguration.ProcessId)
// GetSink creates a new sink if we don't have any (use contexts here later)
return CrossAppDomainSink.GetSink(cadData.DomainID);
}
if (url != null && url.StartsWith(_strName))
throw new NotSupportedException("Can't create a named channel via crossappdomain");
return null;
}
}
[MonoTODO("Handle domain unloading?")]
internal class CrossAppDomainSink : IMessageSink
{
private static Hashtable s_sinks = new Hashtable();
private static MethodInfo processMessageMethod =
typeof (CrossAppDomainSink).GetMethod ("ProcessMessageInDomain", BindingFlags.NonPublic|BindingFlags.Static);
private int _domainID;
internal CrossAppDomainSink(int domainID)
{
_domainID = domainID;
}
internal static CrossAppDomainSink GetSink(int domainID)
{
// Check if we have a sink for the current domainID
// note, locking is not to bad here, very few class to GetSink
lock (s_sinks.SyncRoot)
{
if (s_sinks.ContainsKey(domainID))
return (CrossAppDomainSink) s_sinks[domainID];
else
{
CrossAppDomainSink sink = new CrossAppDomainSink(domainID);
s_sinks[domainID] = sink;
return sink;
}
}
}
internal int TargetDomainId {
get { return _domainID; }
}
private struct ProcessMessageRes {
public byte[] arrResponse;
public CADMethodReturnMessage cadMrm;
}
#pragma warning disable 169
private static ProcessMessageRes ProcessMessageInDomain (
byte[] arrRequest,
CADMethodCallMessage cadMsg)
{
ProcessMessageRes res = new ProcessMessageRes ();
try
{
AppDomain.CurrentDomain.ProcessMessageInDomain (arrRequest, cadMsg, out res.arrResponse, out res.cadMrm);
}
catch (Exception e)
{
IMessage errorMsg = new MethodResponse (e, new ErrorMessage());
res.arrResponse = CADSerializer.SerializeMessage (errorMsg).GetBuffer();
}
return res;
}
#pragma warning restore 169
public virtual IMessage SyncProcessMessage(IMessage msgRequest)
{
IMessage retMessage = null;
try
{
// Time to transit into the "our" domain
byte [] arrResponse = null;
byte [] arrRequest = null;
CADMethodReturnMessage cadMrm = null;
CADMethodCallMessage cadMsg;
cadMsg = CADMethodCallMessage.Create (msgRequest);
if (null == cadMsg) {
// Serialize the request message
MemoryStream reqMsgStream = CADSerializer.SerializeMessage(msgRequest);
arrRequest = reqMsgStream.GetBuffer();
}
Context currentContext = Thread.CurrentContext;
try {
// InternalInvoke can't handle out arguments, this is why
// we return the results in a structure
ProcessMessageRes res = (ProcessMessageRes)AppDomain.InvokeInDomainByID (_domainID, processMessageMethod, null, new object [] { arrRequest, cadMsg });
arrResponse = res.arrResponse;
cadMrm = res.cadMrm;
} finally {
AppDomain.InternalSetContext (currentContext);
}
if (null != arrResponse) {
// Time to deserialize the message
MemoryStream respMsgStream = new MemoryStream(arrResponse);
// Deserialize the response message
retMessage = CADSerializer.DeserializeMessage(respMsgStream, msgRequest as IMethodCallMessage);
} else
retMessage = new MethodResponse (msgRequest as IMethodCallMessage, cadMrm);
}
catch (Exception e)
{
try
{
retMessage = new ReturnMessage (e, msgRequest as IMethodCallMessage);
}
catch (Exception)
{
// this is just to be sure
}
}
return retMessage;
}
public virtual IMessageCtrl AsyncProcessMessage (IMessage reqMsg, IMessageSink replySink)
{
AsyncRequest req = new AsyncRequest (reqMsg, replySink);
ThreadPool.QueueUserWorkItem (new WaitCallback ((data) => {
try {
SendAsyncMessage (data);
} catch {}
}
), req);
return null;
}
public void SendAsyncMessage (object data)
{
AsyncRequest req = (AsyncRequest)data;
IMessage response = SyncProcessMessage (req.MsgRequest);
req.ReplySink.SyncProcessMessage (response);
}
public IMessageSink NextSink { get { return null; } }
}
internal class CADSerializer
{
internal static IMessage DeserializeMessage(MemoryStream mem, IMethodCallMessage msg)
{
BinaryFormatter serializer = new BinaryFormatter();
serializer.SurrogateSelector = null;
mem.Position = 0;
if (msg == null)
return (IMessage) serializer.Deserialize(mem, null);
else
return (IMessage) serializer.DeserializeMethodResponse(mem, null, msg);
}
internal static MemoryStream SerializeMessage(IMessage msg)
{
MemoryStream mem = new MemoryStream ();
BinaryFormatter serializer = new BinaryFormatter ();
serializer.SurrogateSelector = new RemotingSurrogateSelector ();
serializer.Serialize (mem, msg);
mem.Position = 0;
return mem;
}
internal static MemoryStream SerializeObject(object obj)
{
MemoryStream mem = new MemoryStream ();
BinaryFormatter serializer = new BinaryFormatter ();
serializer.SurrogateSelector = new RemotingSurrogateSelector ();
serializer.Serialize (mem, obj);
mem.Position = 0;
return mem;
}
internal static object DeserializeObject(MemoryStream mem)
{
BinaryFormatter serializer = new BinaryFormatter();
serializer.SurrogateSelector = null;
mem.Position = 0;
return serializer.Deserialize (mem);
}
}
internal class AsyncRequest
{
internal IMessageSink ReplySink;
internal IMessage MsgRequest;
public AsyncRequest (IMessage msgRequest, IMessageSink replySink)
{
ReplySink = replySink;
MsgRequest = msgRequest;
}
}
}

View File

@@ -0,0 +1,43 @@
//
// System.Runtime.Remoting.Channels.IChannel.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IChannel
{
string ChannelName { get; }
int ChannelPriority { get; }
string Parse (string url, out string objectURI);
}
}

View File

@@ -0,0 +1,41 @@
//
// System.Runtime.Remoting.Channels.IChannelDataStore.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IChannelDataStore
{
string [] ChannelUris { get;}
object this [object key] { get; set; }
}
}

View File

@@ -0,0 +1,45 @@
//
// System.Runtime.Remoting.Channels.IChannelReceiver.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IChannelReceiver : IChannel
{
object ChannelData { get; }
string [] GetUrlsForUri (string objectURI);
void StartListening (object data);
void StopListening (object data);
}
}

View File

@@ -0,0 +1,46 @@
//
// System.Runtime.Remoting.Channels.IChannelReceiverHook.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IChannelReceiverHook
{
string ChannelScheme { get; }
IServerChannelSink ChannelSinkChain { get; }
bool WantsToListen { get; }
void AddHookChannelUri (string channelUri);
}
}

View File

@@ -0,0 +1,41 @@
//
// System.Runtime.Remoting.Channels.IChannelSender.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Runtime.Remoting.Messaging;
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IChannelSender : IChannel
{
IMessageSink CreateMessageSink (string url, object remoteChannelData, out string objectURI);
}
}

View File

@@ -0,0 +1,41 @@
//
// System.Runtime.Remoting.Channels.IChannelSinkBase.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IChannelSinkBase
{
IDictionary Properties { get; }
}
}

View File

@@ -0,0 +1,53 @@
//
// System.Runtime.Remoting.Channels.IClientChannelSink.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.IO;
using System.Runtime.Remoting.Messaging;
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IClientChannelSink : IChannelSinkBase
{
IClientChannelSink NextChannelSink { get; }
void AsyncProcessRequest (IClientChannelSinkStack sinkStack, IMessage msg,
ITransportHeaders headers, Stream stream);
void AsyncProcessResponse (IClientResponseChannelSinkStack sinkStack, object state,
ITransportHeaders headers, Stream stream);
Stream GetRequestStream (IMessage msg, ITransportHeaders headers);
void ProcessMessage (IMessage msg, ITransportHeaders requestHeaders, Stream requestStream,
out ITransportHeaders responseHeaders, out Stream responseStream);
}
}

View File

@@ -0,0 +1,44 @@
//
// System.Runtime.Remoting.Channels.IClientChannelSinkProvider.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.IO;
using System.Runtime.Remoting.Messaging;
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IClientChannelSinkProvider
{
IClientChannelSinkProvider Next { get; set; }
IClientChannelSink CreateSink (IChannelSender channel, string url, object remoteChannelData);
}
}

View File

@@ -0,0 +1,41 @@
//
// System.Runtime.Remoting.Channels.IClientChannelSinkStack.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IClientChannelSinkStack : IClientResponseChannelSinkStack
{
object Pop (IClientChannelSink sink);
void Push (IClientChannelSink sink, object state);
}
}

View File

@@ -0,0 +1,41 @@
//
// System.Runtime.Remoting.Channels.IClientFormatterSink.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2002 (C) Copyright, Ximian, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Runtime.Remoting.Messaging;
namespace System.Runtime.Remoting.Channels {
[System.Runtime.InteropServices.ComVisible (true)]
public interface IClientFormatterSink : IMessageSink, IClientChannelSink, IChannelSinkBase
{
}
}

Some files were not shown because too many files have changed in this diff Show More