concept object in category sharePoint

appears as: object, object, n object, objects, objects, The objects, The object
SharePoint 2010 Web Parts in Action

This is an excerpt from Manning's book SharePoint 2010 Web Parts in Action.

void button_Click(object sender, EventArgs e) {
    throw new NotImplementedException();
}

The RSS feed is loaded using the XElement.Load method. The BulletedList control is used to show the feed items; its display mode is set to HyperLink so that the user can click each item in the list. Each feed item is then retrieved using LINQ to XML. Using the LINQ extension methods Descendants and Take the first ItemCount number of item elements are fetched from the feed. For each feed item, the method will create a new ListItem object. The method sets the object’s Text property to the feed item’s title and the Value property to its URL.

void m_cache_CheckedChanged(object sender, EventArgs e) {
    m_cacheTime.Enabled = m_cache.Checked;
}

In this Converter class, you need to implement four methods. The CanConvertTo method checks if this converter can convert to a Coordinate object. If this method returns true, then the .NET Framework needs the ConvertTo method to convert the object. This method returns the string representation of the Coordinate object if the destination type is a string and the value is a Coordinate. The third method, CanConvertFrom, is used to check if the converter can convert the object of the specified type to the type of the converter. This method returns true if the source type is a string. If it returns true, the conversion process needs the ConvertFrom method to perform the conversion. The method takes the supplied string value and splits it, and then creates a Coordinate object and sets the values. Finally, it returns the Coordinate object.

To let SharePoint and other applications using the Coordinate class know which converter to use, add the TypeConverter attribute to the Coordinate class. This attribute specifies the type of converter to use for the object at runtime. The class declaration of the Coordinate class should look like this: