Skip to content

Commit

Permalink
[corlib] Apply activation attributes for IsContextful types only
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar committed Mar 3, 2015
1 parent b917128 commit 74793c4
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -42,7 +42,10 @@ public IConstructionReturnMessage Activate (IConstructionCallMessage msg)
if (!RemotingConfiguration.IsActivationAllowed (msg.ActivationType))
throw new RemotingException ("The type " + msg.ActivationTypeName + " is not allowed to be client activated");

object[] activationAttributes = new object[] { new RemoteActivationAttribute (msg.ContextProperties) };
object[] activationAttributes = null;
if (msg.ActivationType.IsContextful)
activationAttributes = new object[] { new RemoteActivationAttribute (msg.ContextProperties) };

MarshalByRefObject newObject = (MarshalByRefObject) Activator.CreateInstance (msg.ActivationType, msg.Args, activationAttributes);

// The activator must return a ConstructionResponse with an ObjRef as return value.
Expand Down

0 comments on commit 74793c4

Please sign in to comment.