Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

BizTalk 2006 : Creating More Complex Pipeline Components (part 2) - Schema Selection in VS .NET Designer

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
8/3/2014 9:34:14 PM

Schema Selection in VS .NET Designer

The property MyDocSpec in the previous section's MyProber class is actually of type SchemaWithNone. SchemaWithNone is a class that lives in the Microsoft.BizTalk. Component.Utilities.dll assembly. Defining a property of type SchemaWithNone will give the user a drop-down list of all deployed schemas within the current BizTalk Management Database. The class has one public constructor, SchemaWithNone, which initializes a new instance of the SchemaWithNone class. Table 1 and Table 2 list the public properties and methods of the class.

Table 1. SchemaWithNone Public Properties
PropertyDescription
AssemblyName(inherited from Schema)Gets or sets the schema assembly name
DocSpecName (inherited from Schema)Gets or sets the document spec name for the selected schema
RootName (inherited from Schema)Gets or sets the root node of the selected schema
SchemaName (inherited from Schema)GGets or sets the selected schema name
TargetNamespace (inherited from Schema)Gets or sets the selected schema name

Table 2. SchemaWithNone Public Methods
MethodDescription
Equals(inherited from Schema)Overridden. Determines whether the specified Object is equal to the current Object.
GetHashCode(inherited from Schema)Overridden. Returns the hash code for this instance.
GetType (inherited from System.Object)For additional information about the System namespace, see the .NET Framework documentation available from Visual Studio .NET or online at http://go.microsoft.com/fwlink/?LinkID=9677.
ToString (inherited from Schema)Overridden. Converts the value of this instance to its equivalent string representation using the specified format.

As you can see in Figure 2, the properties for the SchemaWithNone class are available in the IDE. If you notice the InboundDocSpec property, it is a list of all the schemas that are currently deployed to the BizTalk solution. The SchemaWithNone property allows you to select one and only one schema from the deployed schemas, and this information will be used to populate the properties of the object as defined previously (AssemblyName, DocSpecName, etc.).

In the example from the preceding section, you want your developer to select only one schema, but what if your developer needs multiple? In many cases, your component will be able to handle a variety of schemas; in this case, you need to use the SchemaList property.

In the case where your property needs to select multiple schemas, you need to use the SchemaList object. Such an object will provide developers with an associate window from which they can choose multiple schemas. The selected schemas will be available as a collection of schemas within a main class. The IDE will present a screen as shown in Figure 3.

SchemaWithNone example in VS .NET

SchemaList example in VS .NET

Decorating Your Properties

It is important to consider the usability of your components from within the Visual Studio IDE. If you simply expose a public property from within your pipeline component, two things will happen. First, the property name that is displayed in the IDE will be the name of the property (in Figure 1 earlier, this would be InboundDocumentList, etc.). Second, there is no public description for what the property actually does. In order to make your components usable, you can use custom attributes to decorate your properties with metadata so that the developer experience is improved. The two main attributes you can use to do this are described next.

Using the DisplayName and Description Attributes

The DisplayName attribute allows you to set the name for the property that will be displayed in the IDE. The Description attribute sets the description box within the VS .NET designer to a friendly description. The effect of these attributes is shown in Figure 4. The following code snippet demonstrates how these attributes are to be used:

'<summary>
'this property will contain a single schema
'</summary>
<Description("The inbound request document specification. Only messages of this _
type will be accepted by the component.")> _
<DisplayName("Inbound Specification")> _
Public Property InboundFileDocumentSpecification() As _
Microsoft.BizTalk.Component.Utilities.SchemaWithNone
Get
Return _InboundFileDocumentSpecification
End Get
Set(ByVal Value As Microsoft.BizTalk.Component.Utilities.SchemaWithNone)
_ InboundFileDocumentSpecification = Value
End Set
End Property


DisplayName and Description attributes set

Other -----------------
- BizTalk 2006 : Custom Components (part 2) - Key BizTalk API Objects
- BizTalk 2006 : Custom Components (part 1) - Component Categories, Component Interfaces
- Microsoft Exchange Server 2010 : Getting Started with Email Archiving - Enabling Archiving (part 2) - Using Exchange 2010 Discovery, Offline Access
- Microsoft Exchange Server 2010 : Getting Started with Email Archiving - Enabling Archiving (part 1) - Archive Quotas , Exchange 2010 Discovery Operation Considerations
- Microsoft Exchange Server 2010 : Getting Started with Email Archiving - Placing a Mailbox on Retention Hold, Litigation or Legal Hold
- Microsoft Exchange Server 2010 : Getting Started with Email Archiving - Exchange Server 2010 Email Archiving - Policies
- Microsoft Exchange Server 2010 : Getting Started with Email Archiving - Industry Best Practices
- Microsoft Exchange Server 2010 : Getting Started with Email Archiving - Archiving
- Microsoft Exchange Server 2007 : Implementing Client Access and Hub Transport Servers - Installing the Hub Transport Server
- Microsoft Exchange Server 2007 : Implementing Client Access and Hub Transport Servers - Transport Pipeline
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server