DocumentConversionsLoadBalancerPicker Class
Represents a drop-down list from which a user can select a document conversions load balancer server for use in a Web application.
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.BaseDataBoundControl
System.Web.UI.WebControls.DataBoundControl
System.Web.UI.WebControls.ListControl
System.Web.UI.WebControls.DropDownList
Microsoft.SharePoint.WebControls.DocumentConversionsLoadBalancerPicker
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.BaseDataBoundControl
System.Web.UI.WebControls.DataBoundControl
System.Web.UI.WebControls.ListControl
System.Web.UI.WebControls.DropDownList
Microsoft.SharePoint.WebControls.DocumentConversionsLoadBalancerPicker
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
DocumentConversionsLoadBalancerPicker
Description
The Microsoft.SharePoint.WebControls.DocumentConversionsLoadBalancerPicker sealed class inherits from the
System.Web.UI.WebControls.DropDownList to allow control representation that allows the user to select a single item from a dropdown list. In
regards to the DocumentConversionsLoadBalancerPicker control, the respective items within the control are populated through firstly recurring the Microsoft.SharePoint.Administration.SPServiceInstanceCollection collection for each SPServer object. By recurring the SPServiceInstanceCollection for each SPServer object (uniquely identified by their ID), the SPServiceInstance can have the SPServiceInstance.Status property tested to determine
whether it is equal to SPObjectStatus.Online. This SPServiceInstance can then casted in order to construct a SPLoadBalancerServiceInstance object to represent an item in the selection menu.
It is important to note the casting operation is a safe cast, so no exception will be thrown if it fails but instead the SPLoadBalancerServiceInstance
object will be null. The object state can subsequently be tested later in code.
Usage Scenario
The primary usage of the DocumentConversionsLoadBalancerPicker is providing a selection screen to provide a picker to aid in selection of balancers which effects document conversion requests across the SharePoint server farm. The SPLoadBalancerServiceInstance class has only one property, Url which points to document conversion launcher service that the conversion load balancer service is responsible to provide. WSS will use this then
leveraging .NET Remoting to perform conversion services.
Use of the DocumentConversionsLoadBalancerPicker object is analogous to any WebControl, however as an administrative control finds little use in custom development projects, outside of an overhaul of preexisting Central Administration operations pages. As it is sealed, it is not possible to use
the class as a base class.
In the below example, MyClass is inheriting from the System.Web.UI.WebControls.WebParts.WebPart class and its CreateChildControls method is
being overridden. Following, a new DocumentConversionsLoadBalancerPicker object is being created with its ID property being set to something
unique. Subsequently this control is being added to the current instance control collection.
C# Code Example
public class MyClass : WebPart
{
protected override void CreateChildControls()
{
DocumentConversionsLoadBalancerPicker picker = new DocumentConversionsLoadBalancerPicker();
picker.ID = "My Picker";
Controls.Add(picker);
base.CreateChildControls();
}
}
VB.NET Code Example
Public Class [MyClass]
Inherits WebPart
Protected Overloads Overrides Sub CreateChildControls()
Dim picker As New DocumentConversionsLoadBalancerPicker()
picker.ID = "My Picker"
Controls.Add(picker)
MyBase.CreateChildControls()
End Sub
End Class
Adam Buenz
SharePoint Services MVP - http://www.sharepointsecurity.com
The Microsoft.SharePoint.WebControls.DocumentConversionsLoadBalancerPicker sealed class inherits from the
System.Web.UI.WebControls.DropDownList to allow control representation that allows the user to select a single item from a dropdown list. In
regards to the DocumentConversionsLoadBalancerPicker control, the respective items within the control are populated through firstly recurring the Microsoft.SharePoint.Administration.SPServiceInstanceCollection collection for each SPServer object. By recurring the SPServiceInstanceCollection for each SPServer object (uniquely identified by their ID), the SPServiceInstance can have the SPServiceInstance.Status property tested to determine
whether it is equal to SPObjectStatus.Online. This SPServiceInstance can then casted in order to construct a SPLoadBalancerServiceInstance object to represent an item in the selection menu.
It is important to note the casting operation is a safe cast, so no exception will be thrown if it fails but instead the SPLoadBalancerServiceInstance
object will be null. The object state can subsequently be tested later in code.
Usage Scenario
The primary usage of the DocumentConversionsLoadBalancerPicker is providing a selection screen to provide a picker to aid in selection of balancers which effects document conversion requests across the SharePoint server farm. The SPLoadBalancerServiceInstance class has only one property, Url which points to document conversion launcher service that the conversion load balancer service is responsible to provide. WSS will use this then
leveraging .NET Remoting to perform conversion services.
Use of the DocumentConversionsLoadBalancerPicker object is analogous to any WebControl, however as an administrative control finds little use in custom development projects, outside of an overhaul of preexisting Central Administration operations pages. As it is sealed, it is not possible to use
the class as a base class.
In the below example, MyClass is inheriting from the System.Web.UI.WebControls.WebParts.WebPart class and its CreateChildControls method is
being overridden. Following, a new DocumentConversionsLoadBalancerPicker object is being created with its ID property being set to something
unique. Subsequently this control is being added to the current instance control collection.
C# Code Example
public class MyClass : WebPart
{
protected override void CreateChildControls()
{
DocumentConversionsLoadBalancerPicker picker = new DocumentConversionsLoadBalancerPicker();
picker.ID = "My Picker";
Controls.Add(picker);
base.CreateChildControls();
}
}
VB.NET Code Example
Public Class [MyClass]
Inherits WebPart
Protected Overloads Overrides Sub CreateChildControls()
Dim picker As New DocumentConversionsLoadBalancerPicker()
picker.ID = "My Picker"
Controls.Add(picker)
MyBase.CreateChildControls()
End Sub
End Class
Adam Buenz
SharePoint Services MVP - http://www.sharepointsecurity.com
- 5/18/2010
- Adam Buenz - MVP
- 5/19/2010
- Adam Buenz - MVP