Creating the Control Library Project
The first step in creating a control library is to ensure we have a well-organized namespace to
identify and partition our controls from the rest of the control universe. A common paradigm for
selecting such a namespace is to put business entities or organizations first, followed by a product
or project title, followed by significant divisions within the actual product. For the Live Search web
service control, we will use a namespace of ControlsBook2Lib.CH12.LiveSearchControls to follow
the pattern used throughout this book. We give the Visual Studio project the same name
(ControlsBook2Lib.CH12.LiveSearchControls), and we give the control assembly the output
name of ControlsBook2Lib.CH12.LiveSearchControls.dll. Keeping the namespace and the
assembly name in sync like this is not a requirement, but it is a good design guideline to
follow because it is mimicked by system DLLs, such as System.Web.dll, that are part of the
.NET Framework.
Table 12-3. Live Search Web Service Result Object??™s Fields
Field Type Description
Address Address Has a value of type Address if performing a PhoneBook
SourceType search
CachedURL string Returns the URL to the cached version of the page
DateTime DateTime Returns a DateTime object containing the date and time the
page was last indexed by the search engine
Description string Returns the description text for the search result
URL string Returns the URL for the search result
Location Location Returns the Location object associated with a PhoneBook or
QueryLocation search
Phone string Returns the phone number as part of a PhoneBook search
Source string Returns the Source of a news or Encarta article search
Title string Returns the title for the search query
URL string Absolute path to the URL that matches the query
584 CHAPTER 12 ?– B U ILDING A COMPLEX CONTROL
Strong-Named Assemblies and Versioning Attributes
After we decide on a namespace for our control project, the next step is to decide what sort of
versioning policy we want to apply to it.
Pages:
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766