Specify Parameter Metadata for Silverlight Forms

When parameter metadata is extracted from a form, the following attributes are parsed:

AttributesDescription
System.ComponentModel.EditorBrowsable(EditorBrowsable) Indicates that the Silverlight property should be exposed as a parameter
System.ComponentModel.DescriptionAttributeProvides a description of the parameter that is displayed in the Workflow editor
ParameterRenameAttributeAllows the parameter to have a different name than the Silverlight property
ParameterDisplayNameAttribute Changes the name of the parameter as presented to the user
InputAttributeIndicates that the property will be treated as an input to the form. If the property does not have a public set method then an error will be generated while extracting the metadata
OutputAttributeIndicates that the property will be treated as an output from the form. If the property does not have a public get method then an error will be generated while extracting the metadata
ParameterDirectoryResourceMetadataAttributeProvides additional metadata for properties that have a type of DirectoryResource
DefaultValueProvides a default value for the parameter. The argument to the attribute is a string. This string is then converted to the data type of the parameter. If the conversion fails then an exception is thrown
The InputAttribute and OutputAttribute attributes should be used to indicate if the property should be treated as an input or an output parameter. If neither is present then a property with a public set method will be treated as an input parameter. If there is no public set method and there is a public get method then the property will be treated as an output parameter. Examples of properties with attributes are shown below:
  •     [EditorBrowsable]
        [ParameterDisplayNameAttribute("Property With Input And Output")]
        [Input]
        [System.ComponentModel.DefaultValueAttribute("default value")]
        [System.ComponentModel.Description("PropertyWithInputAndOutput Description")]
        public string PropertyWithInputAndOutput { get; set; }
  •     [EditorBrowsable]
        [System.ComponentModel.Description("PropertyWithInput Description")]
        [ParameterRenameAttribute("PropertyRenamed")]
        public int PropertyWithInput { set {} }
  •     [EditorBrowsable]
        [Output]
        [System.ComponentModel.Description("PropertyWithOutput Description")]
        public string PropertyWithOutput { get { return "";} }
  •     [EditorBrowsable]
        [System.ComponentModel.Description("DirectoryResourceOutput Description")]
        [ParameterDirectoryResourceMetadata("adq", "1,2", "3,4")]
        public DirectoryResource DirectoryResourceOutput { get { return new 
    DirectoryResource(""); } }