Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / clr / src / BCL / System / Runtime / Serialization / Formatters / Binary / BinaryMethodMessage.cs / 1 / BinaryMethodMessage.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
namespace System.Runtime.Serialization.Formatters.Binary
{
using System;
using System.Collections;
using System.Runtime.Remoting.Messaging;
using System.Reflection;
[Serializable()]
internal sealed class BinaryMethodCallMessage
{
Object[] _inargs = null;
String _methodName = null;
String _typeName = null;
Object _methodSignature = null;
Type[] _instArgs = null;
Object[] _args = null;
LogicalCallContext _logicalCallContext = null;
Object[] _properties = null;
internal BinaryMethodCallMessage(String uri, String methodName, String typeName, Type[] instArgs, Object[] args, Object methodSignature, LogicalCallContext callContext, Object[] properties)
{
_methodName = methodName;
_typeName = typeName;
//_uri = uri;
if (args == null)
args = new Object[0];
_inargs = args;
_args = args;
_instArgs = instArgs;
_methodSignature = methodSignature;
if (callContext == null)
_logicalCallContext = new LogicalCallContext();
else
_logicalCallContext = callContext;
_properties = properties;
}
public String MethodName
{
get {return _methodName;}
}
public String TypeName
{
get {return _typeName;}
}
public Type[] InstantiationArgs
{
get {return _instArgs;}
}
public Object MethodSignature
{
get {return _methodSignature;}
}
public Object[] Args
{
get {return _args;}
}
public LogicalCallContext LogicalCallContext
{
get {return _logicalCallContext;}
}
public bool HasProperties
{
get {return (_properties != null);}
}
internal void PopulateMessageProperties(IDictionary dict)
{
foreach (DictionaryEntry de in _properties)
{
dict[de.Key] = de.Value;
}
}
}
[Serializable()]
internal class BinaryMethodReturnMessage
{
Object[] _outargs = null;
Exception _exception = null;
Object _returnValue = null;
Object[] _args = null;
LogicalCallContext _logicalCallContext = null;
Object[] _properties = null;
internal BinaryMethodReturnMessage(Object returnValue, Object[] args, Exception e, LogicalCallContext callContext, Object[] properties)
{
_returnValue = returnValue;
if (args == null)
args = new Object[0];
_outargs = args;
_args= args;
_exception = e;
if (callContext == null)
_logicalCallContext = new LogicalCallContext();
else
_logicalCallContext = callContext;
_properties = properties;
}
public Exception Exception
{
get {return _exception;}
}
public Object ReturnValue
{
get {return _returnValue;}
}
public Object[] Args
{
get {return _args;}
}
public LogicalCallContext LogicalCallContext
{
get {return _logicalCallContext;}
}
public bool HasProperties
{
get {return (_properties != null);}
}
internal void PopulateMessageProperties(IDictionary dict)
{
foreach (DictionaryEntry de in _properties)
{
dict[de.Key] = de.Value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
namespace System.Runtime.Serialization.Formatters.Binary
{
using System;
using System.Collections;
using System.Runtime.Remoting.Messaging;
using System.Reflection;
[Serializable()]
internal sealed class BinaryMethodCallMessage
{
Object[] _inargs = null;
String _methodName = null;
String _typeName = null;
Object _methodSignature = null;
Type[] _instArgs = null;
Object[] _args = null;
LogicalCallContext _logicalCallContext = null;
Object[] _properties = null;
internal BinaryMethodCallMessage(String uri, String methodName, String typeName, Type[] instArgs, Object[] args, Object methodSignature, LogicalCallContext callContext, Object[] properties)
{
_methodName = methodName;
_typeName = typeName;
//_uri = uri;
if (args == null)
args = new Object[0];
_inargs = args;
_args = args;
_instArgs = instArgs;
_methodSignature = methodSignature;
if (callContext == null)
_logicalCallContext = new LogicalCallContext();
else
_logicalCallContext = callContext;
_properties = properties;
}
public String MethodName
{
get {return _methodName;}
}
public String TypeName
{
get {return _typeName;}
}
public Type[] InstantiationArgs
{
get {return _instArgs;}
}
public Object MethodSignature
{
get {return _methodSignature;}
}
public Object[] Args
{
get {return _args;}
}
public LogicalCallContext LogicalCallContext
{
get {return _logicalCallContext;}
}
public bool HasProperties
{
get {return (_properties != null);}
}
internal void PopulateMessageProperties(IDictionary dict)
{
foreach (DictionaryEntry de in _properties)
{
dict[de.Key] = de.Value;
}
}
}
[Serializable()]
internal class BinaryMethodReturnMessage
{
Object[] _outargs = null;
Exception _exception = null;
Object _returnValue = null;
Object[] _args = null;
LogicalCallContext _logicalCallContext = null;
Object[] _properties = null;
internal BinaryMethodReturnMessage(Object returnValue, Object[] args, Exception e, LogicalCallContext callContext, Object[] properties)
{
_returnValue = returnValue;
if (args == null)
args = new Object[0];
_outargs = args;
_args= args;
_exception = e;
if (callContext == null)
_logicalCallContext = new LogicalCallContext();
else
_logicalCallContext = callContext;
_properties = properties;
}
public Exception Exception
{
get {return _exception;}
}
public Object ReturnValue
{
get {return _returnValue;}
}
public Object[] Args
{
get {return _args;}
}
public LogicalCallContext LogicalCallContext
{
get {return _logicalCallContext;}
}
public bool HasProperties
{
get {return (_properties != null);}
}
internal void PopulateMessageProperties(IDictionary dict)
{
foreach (DictionaryEntry de in _properties)
{
dict[de.Key] = de.Value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PermissionSetEnumerator.cs
- PerfCounterSection.cs
- MailAddress.cs
- ListViewHitTestInfo.cs
- DisposableCollectionWrapper.cs
- TdsParser.cs
- Base64Decoder.cs
- Dictionary.cs
- InstancePersistenceException.cs
- Bits.cs
- CommandDevice.cs
- MarkupCompilePass2.cs
- KnowledgeBase.cs
- SmiContext.cs
- ReferencedCollectionType.cs
- Encoding.cs
- MarkupExtensionSerializer.cs
- ResourcePool.cs
- NotificationContext.cs
- WrappedIUnknown.cs
- WrapPanel.cs
- HttpPostLocalhostServerProtocol.cs
- WS2007FederationHttpBinding.cs
- NavigationProperty.cs
- RepeatInfo.cs
- MethodAccessException.cs
- ValidationEventArgs.cs
- GetUserPreferenceRequest.cs
- BoundingRectTracker.cs
- ModelPropertyCollectionImpl.cs
- Package.cs
- DiscoveryReferences.cs
- PrinterSettings.cs
- DispatcherFrame.cs
- CaretElement.cs
- ToolbarAUtomationPeer.cs
- OracleColumn.cs
- PersonalizableTypeEntry.cs
- ProtocolsSection.cs
- Animatable.cs
- EventLogRecord.cs
- XD.cs
- ClientOperation.cs
- SetIterators.cs
- TiffBitmapEncoder.cs
- TextOptions.cs
- DBPropSet.cs
- DatePickerTextBox.cs
- MenuItemBindingCollection.cs
- CollectionBuilder.cs
- Debug.cs
- WebPartEditorApplyVerb.cs
- BaseTemplateCodeDomTreeGenerator.cs
- CodeDirectoryCompiler.cs
- MessageSmuggler.cs
- EncoderParameter.cs
- Stack.cs
- ReachPrintTicketSerializerAsync.cs
- SystemNetworkInterface.cs
- Publisher.cs
- CollectionContainer.cs
- DrawListViewColumnHeaderEventArgs.cs
- PrintController.cs
- PreDigestedSignedInfo.cs
- QueryRewriter.cs
- ActivityCodeDomSerializationManager.cs
- AppSettingsReader.cs
- EventSetterHandlerConverter.cs
- IDataContractSurrogate.cs
- FontResourceCache.cs
- ColumnProvider.cs
- ContainerUIElement3D.cs
- DelegatingStream.cs
- Rect3DValueSerializer.cs
- DataSourceExpression.cs
- MetadataCollection.cs
- AssemblyCacheEntry.cs
- XDRSchema.cs
- CurrencyManager.cs
- WindowsListViewItemStartMenu.cs
- RNGCryptoServiceProvider.cs
- X509CertificateRecipientClientCredential.cs
- RIPEMD160Managed.cs
- SHA1Managed.cs
- RegexGroup.cs
- ProcessModuleCollection.cs
- SystemIcmpV4Statistics.cs
- RemoveFromCollection.cs
- OleDbReferenceCollection.cs
- XmlSchemaIdentityConstraint.cs
- CustomPopupPlacement.cs
- ConnectorMovedEventArgs.cs
- LineGeometry.cs
- StrongBox.cs
- EDesignUtil.cs
- QilList.cs
- PrivilegedConfigurationManager.cs
- TransportConfigurationTypeElement.cs
- SurrogateChar.cs
- PreservationFileWriter.cs