Simias::Policy::PolicyTime Class Reference

Object used to validate when a policy is valid. More...

List of all members.

Public Member Functions

 PolicyTime ()
 Initializes a new instance of the object class.
 PolicyTime (PolicyTime time)
 Initializes a new instance of the object class.
Rule.Result Apply ()
 Applies the time condition to determine if the policy is valid.
Rule.Result Apply (DateTime time)
 Applies the time condition to determine if the policy is valid.
void Clear ()
 Clears all selected times.
void Clear (DayOfWeek day, int hour)
 Clears the specified selected time.
void Clear (DayOfWeek startDay, DayOfWeek endDay, int startHour, int endHour)
 Clears the specified selected range of time.
bool IsClear (DayOfWeek day, int hour)
 Indicates whether the specified time is clear.
bool IsSet (DayOfWeek day, int hour)
 Indicates whether the specified time is selected.
void Set ()
 Sets all time values to selected.
void Set (DayOfWeek day, int hour)
 Sets the specified time as selected.
void Set (DayOfWeek startDay, DayOfWeek endDay, int startHour, int endHour)
 Sets the specified range of time as selected.
byte[] ToByteArray ()
 Converts the object to a byte array that represents time values in a 7 day week, 24 hour period.
override string ToString ()
 Converts the value of this instance to its equivalent string.


Detailed Description

Object used to validate when a policy is valid.


Constructor & Destructor Documentation

Simias::Policy::PolicyTime::PolicyTime (  )  [inline]

Initializes a new instance of the object class.

Simias::Policy::PolicyTime::PolicyTime ( PolicyTime  time  )  [inline]

Initializes a new instance of the object class.


Member Function Documentation

Rule.Result Simias::Policy::PolicyTime::Apply (  )  [inline]

Applies the time condition to determine if the policy is valid.

Returns:
Rule.Result.Allow is returned if the policy is valid. Otherwise Rule.Result.Deny is returned.

Rule.Result Simias::Policy::PolicyTime::Apply ( DateTime  time  )  [inline]

Applies the time condition to determine if the policy is valid.

Parameters:
time Time to check if policy is valid.
Returns:
Rule.Result.Allow is returned if the policy is valid. Otherwise Rule.Result.Deny is returned.

void Simias::Policy::PolicyTime::Clear (  )  [inline]

Clears all selected times.

void Simias::Policy::PolicyTime::Clear ( DayOfWeek  day,
int  hour 
) [inline]

Clears the specified selected time.

Parameters:
day Day of week to clear.
hour Hour of day to clear ( 0 - 23 ).

void Simias::Policy::PolicyTime::Clear ( DayOfWeek  startDay,
DayOfWeek  endDay,
int  startHour,
int  endHour 
) [inline]

Clears the specified selected range of time.

Parameters:
startDay Day of week to start clear.
endDay Day of week to end clear.
startHour Hour of day to start clear.
endHour Hour of day to end clear.

bool Simias::Policy::PolicyTime::IsClear ( DayOfWeek  day,
int  hour 
) [inline]

Indicates whether the specified time is clear.

Parameters:
day Day of week.
hour Hour of day ( 0 - 23 ).
Returns:
True if the time is clear, otherwise false is returned.

bool Simias::Policy::PolicyTime::IsSet ( DayOfWeek  day,
int  hour 
) [inline]

Indicates whether the specified time is selected.

Parameters:
day Day of week.
hour Hour of day ( 0 - 23 ).
Returns:
True if the time is selected, otherwise false is returned.

void Simias::Policy::PolicyTime::Set (  )  [inline]

Sets all time values to selected.

void Simias::Policy::PolicyTime::Set ( DayOfWeek  day,
int  hour 
) [inline]

Sets the specified time as selected.

Parameters:
day Day of week to select.
hour Hour of day to select ( 0 - 23 ).

void Simias::Policy::PolicyTime::Set ( DayOfWeek  startDay,
DayOfWeek  endDay,
int  startHour,
int  endHour 
) [inline]

Sets the specified range of time as selected.

Parameters:
startDay Day of week to start selection.
endDay Day of week to end selection.
startHour Hour of day to start selection.
endHour Hour of day to end selection.

byte [] Simias::Policy::PolicyTime::ToByteArray (  )  [inline]

Converts the object to a byte array that represents time values in a 7 day week, 24 hour period.

Returns:
A byte array that represents time values in a 7 day week, 24 hour period.

override string Simias::Policy::PolicyTime::ToString (  )  [inline]

Converts the value of this instance to its equivalent string.

Returns:
The value of this instance.


The documentation for this class was generated from the following file:

Generated on Wed Apr 8 14:49:43 2009 for simias by  doxygen 1.5.6