Advertisement
hejmus

Untitled

May 25th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1.     public class WriteObject : CodeActivity
  2.     {
  3.         [RequiredArgument]
  4.         [DefaultValue(null)]
  5.         public InArgument What { get; set; }
  6.  
  7.         protected override void Execute(CodeActivityContext context)
  8.         {
  9.             Console.WriteLine(this.What.Get(context));
  10.         }
  11.  
  12.         protected override void CacheMetadata(CodeActivityMetadata metadata)
  13.         {
  14.             Collection<RuntimeArgument> arguments = new Collection<RuntimeArgument>();
  15.             Type argumentType1 = typeof(object);
  16.             if (this.What != null)
  17.                 argumentType1 = this.What.ArgumentType;
  18.             RuntimeArgument runtimeArgument1 = new RuntimeArgument("What", argumentType1, ArgumentDirection.In, true);
  19.             metadata.Bind((Argument)this.What, runtimeArgument1);
  20.             arguments.Add(runtimeArgument1);
  21.             metadata.SetArgumentsCollection(arguments);
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement