My musings about .NET and what not

Instructions Made Easy the MSDN Way

Microsoft doesn't make garage door remotes. Aren't you glad?

 
Microsoft.HOME Documentation Library
GarageDoorOpenerControl
Implements the IRemoteControl interface, and makes remote calls to a registered instance of GarageDoorOpener.
Namespace: Home.Security.IO
Assembly: Some required.
Remarks
An instance of GarageDoorOpenerControl must be registered with one or more instances of GarageDoorOpener programmatically. It cannot be registered at runtime. In turn, the associated GarageDoorOpener object must be attached to an instance of GarageDoor.
As with other controllers that implement IRemoteControl, an instance of a GarageDoorOpenerControl may only be used in the same scope as its associated object, in this case, a GarageDoorOpener. Otherwise, a ProximityException will be thrown.
If a GarageDoorOpenerControl has not been registered with the current GarageDoorOpener instance, or the current GarageDoorOpener instance has not been attached to an instance of GarageDoor, use GarageDoorHandler to open a port in the containing Garage object. Then, add HookupGarageDoorOpener to the HoneyDoList.TaskCollection, in the order determined by the controlling SWMBO (She Who Must Be Obeyed).
Note:
If you are not familiar with the methods of HookupGarageDoorOpener or the tools required to initiate it, see Home Improvement Overview.
If a GarageDoorOpenerControl object has been registered with a GargeDoorOpener, which has in turn been attached to a GarageDoor object, you may use the GarageDoorOpenerControl object to activate the associated GarageDoorOpener by calling its PushButton method. This action causes the GarageDoorOpener to make an implicit call to GarageDoor.Open.
Because GarageDoor implements the IClosable interface, it should be closed explicitly by calling the GarageDoor.Close method; either via the PushButton method, or via the GarageDoorHandler.
Security Note:
GarageDoor.Open opens a port in the containing Garage object, which is a potential security threat. For more information, see Garage Exploits Overview.
Exceptions
Exception Condition
ObstructionException Objects not yet collected by the garbage collector or otherwise properly disposed may block actions of a GarageDoorOpener initiated by the GarageDoorOpenerControl. A best practice is to first check for the presence of such objects, and call the Driveway.Junk.Clear method on any that are found.
ProximityException Caused by calling methods of GarageDoorOpenerControl outside the scope of an associated GarageDoorOpener.
OutOfJuiceException If the value of the GarageDoorOpenerControl.Battery.Power property becomes zero, calls to the PushButton method may have no effect. This exception may be avoided in subsequent calls by running install +new +battery from the SWMBO command line.
Permissions
  • HomeOwnerPermission
    for using the GarageDoorOpenerControl in a hosted environment.
Inheritance Hierarchy
Home.Object
Home.Security
Home.Security.IO
Home.Security.IO.Control
Home.Security.IO.Control.GarageDoorOpenerControl
See Also
Reference
GarageDoorOpenerControl Button
GarageDoorOpener Accessories
IRemoteControl Interface
Other Resources
Introduction to Garages

Subscribe to this blog for more cool content like this!

kick it on DotNetKicks.com

shout it on DotNetShoutOut.com

vote it on WebDevVote.com

Bookmark / Share

    » Similar Posts

    1. Defensive Programming, or Why Exception Handling Is Like Car Insurance
    2. Integrating Exception Handling Into the Development Cycle
    3. Should We Return Null From Our Methods?

    » Trackbacks & Pingbacks

    1. You've been kicked (a good thing) - Trackback from DotNetKicks.com

      Instructions Made Easy the MSDN Way — December 9, 2008 12:11 AM
    2. In case you haven't noticed, the .NET world has been inundated with a flood of new technology over the last year or so -- first C# 3.0, followed quickly by the .NET 3.5 Framework, LINQ, ASP.NET Dynamic Data, the Entity Framework, ADO.NET Data Services

      Books I Wish Would Just Come Out Already — February 7, 2009 12:59 PM
    Trackback link for this post:
    http://leedumond.com/trackback.ashx?id=31

    » Comments

    There are no comments. Kick things off by filling out the form below.

    » Leave a Comment