WebPartsSection.Transformers Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a collection of TransformerInfo objects.
public:
property System::Web::Configuration::TransformerInfoCollection ^ Transformers { System::Web::Configuration::TransformerInfoCollection ^ get(); };
[System.Configuration.ConfigurationProperty("transformers")]
public System.Web.Configuration.TransformerInfoCollection Transformers { get; }
[<System.Configuration.ConfigurationProperty("transformers")>]
member this.Transformers : System.Web.Configuration.TransformerInfoCollection
Public ReadOnly Property Transformers As TransformerInfoCollection
A TransformerInfoCollection collection of TransformerInfo objects.
- Attributes
The following code example shows how to use the Transformers property.
// Add a Transfomer Info Object to the collection using a constructor.
webPartsSection.Transformers.Add(new TransformerInfo(
"RowToFilterTransformer",
"MyCustomTransformers.RowToFilterTransformer"));
// Show all TransformerInfo objects in the collection.
for (int ti = 0;
ti < webPartsSection.Personalization.Providers.Count; ti++)
{
Console.WriteLine(" #{0} Name={1} Type={2}", ti,
webPartsSection.Transformers[ti].Name,
webPartsSection.Transformers[ti].Type);
}
// Remove a TransformerInfo object by name.
webPartsSection.Transformers.Remove("RowToFilterTransformer");
// Remove a TransformerInfo object by index.
webPartsSection.Transformers.RemoveAt(0);
// Clear all TransformerInfo objects from the collection.
webPartsSection.Transformers.Clear();
' Add a Transfomer Info Object to the collection using a constructor.
webPartsSection.Transformers.Add(New TransformerInfo( _
"RowToFilterTransformer", _
"MyCustomTransformers.RowToFilterTransformer"))
' Show all TransformerInfo objects in the collection.
Dim ti As Integer
For ti = 0 To webPartsSection.Personalization.Providers.Count - 1
Console.WriteLine(" #{0} Name={1} Type={2}", ti, _
webPartsSection.Transformers(ti).Name, _
webPartsSection.Transformers(ti).Type)
Next
' Remove a TransformerInfo object by name.
webPartsSection.Transformers.Remove("RowToFilterTransformer")
' Remove a TransformerInfo object by index.
webPartsSection.Transformers.RemoveAt(0)
' Clear all TransformerInfo objects from the collection.
webPartsSection.Transformers.Clear()
TransformerInfo objects specify custom classes that extend the WebPartTransformer class for use by Web Part connections for the ASP.NET applications affected by the configuration file. These transformer classes act as bridges between connected Web Parts, translating data between Web Parts with incompatible connection points.
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: