Microsoft.SharePoint.WebCon ...


DocumentConversionsLoadBalancerPicker Class (Microsoft.SharePoint.WebControls)

Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

Visual Basic (Declaration)
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class DocumentConversionsLoadBalancerPicker
    Inherits DropDownList
Visual Basic (Usage)
Dim instance As DocumentConversionsLoadBalancerPicker
C#
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
public sealed class DocumentConversionsLoadBalancerPicker : DropDownList
Inheritance Hierarchy

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
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Tags :


Community Content

Adam Buenz - MVP
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 drop-down 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 pre-existing 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
Tags :

Page view tracker