Specify Parameter Metadata for Silverlight Forms
When parameter metadata is extracted from a form, the following attributes are parsed:
Attributes | Description |
---|---|
System.ComponentModel.EditorBrowsable(EditorBrowsable) | Indicates that the Silverlight property should be exposed as a parameter |
System.ComponentModel.DescriptionAttribute | Provides a description of the parameter that is displayed in the Workflow editor |
ParameterRenameAttribute | Allows the parameter to have a different name than the Silverlight property |
ParameterDisplayNameAttribute | Changes the name of the parameter as presented to the user |
InputAttribute | Indicates 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 |
OutputAttribute | Indicates 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 |
ParameterDirectoryResourceMetadataAttribute | Provides additional metadata for properties that have a type of DirectoryResource |
DefaultValue | Provides 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 |
-
[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(""); } }