C# Класс DatesGenerator.ModelParameterDateSequence

Наследование: ModelParameterArray, IExportableContainer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddPeriod ( DateFrequency frequency, System.DateTime date, int periods, bool add ) : System.DateTime

Adds a certain number of time to the specified date. The amount of time to be added is based on the value of the frequency and the number of periods to add to the start date.

ExportObjects ( bool recursive ) : List

Gets the objects exported from this parameter.

GetObjectData ( SerializationInfo info, StreamingContext context ) : void

Initializes the serialization information of the current object.

GetStringKind ( ) : string

Gets the kind of data represented by this object.

ModelParameterDateSequence ( System.DateTime startDate, System.DateTime endDate, DateFrequency frequency ) : System

Initializes the object.

ModelParameterDateSequence ( SerializationInfo info, StreamingContext context ) : System

Initializes the object based on the serialized data.

ModelParameterDateSequence ( string startDateExpression, string endDateExpression, string frequencyExpression ) : System

Initializes the object.

Parse ( IProject p_Context ) : bool

Parses the object.

ParsePreview ( IProject p_Context, System.DateTime minDate, System.DateTime maxDate ) : bool

Parses the object for preview purposes.

Приватные методы

Метод Описание
GenerateBackward ( ) : List

Generates the list of dates from the end date.

GenerateForward ( ) : List

Generates the list of dates from the start date.

GetDate ( Project project, string expression ) : System.DateTime

Parses the given expression in order to find the date represented by the expression.

GetDateFrequency ( Project project, string expression ) : DateFrequency

Parses the given expression in order to find the frequency represented by the expression.

InitializeObject ( Project context ) : bool

Initializes the object based on the current expressions using the given object as context.

SetupExportedIDs ( ) : void

Ids for exported objects must be univoque

Validation ( IProject p_Context ) : bool

Validates the data of the object.

Описание методов

AddPeriod() публичный Метод

Adds a certain number of time to the specified date. The amount of time to be added is based on the value of the frequency and the number of periods to add to the start date.
public AddPeriod ( DateFrequency frequency, System.DateTime date, int periods, bool add ) : System.DateTime
frequency DateFrequency The frequency of the dates generation.
date System.DateTime The reference date.
periods int The number of periods to add to the start date.
add bool A value indicating if the period has to be added.
Результат System.DateTime

ExportObjects() публичный Метод

Gets the objects exported from this parameter.
public ExportObjects ( bool recursive ) : List
recursive bool True if export has to be recursive; otherwise false.
Результат List

GetObjectData() публичный Метод

Initializes the serialization information of the current object.
public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info System.Runtime.Serialization.SerializationInfo The SerializationInfo to populate with data.
context System.Runtime.Serialization.StreamingContext The StreamingContext that contains contextual information /// about the destination.
Результат void

GetStringKind() публичный Метод

Gets the kind of data represented by this object.
public GetStringKind ( ) : string
Результат string

ModelParameterDateSequence() публичный Метод

Initializes the object.
public ModelParameterDateSequence ( System.DateTime startDate, System.DateTime endDate, DateFrequency frequency ) : System
startDate System.DateTime The start date.
endDate System.DateTime The end date.
frequency DateFrequency The frequency of the dates generated.
Результат System

ModelParameterDateSequence() публичный Метод

Initializes the object based on the serialized data.
public ModelParameterDateSequence ( SerializationInfo info, StreamingContext context ) : System
info System.Runtime.Serialization.SerializationInfo The SerializationInfo that holds the serialized object data.
context System.Runtime.Serialization.StreamingContext The StreamingContext that contains contextual /// information about the source.
Результат System

ModelParameterDateSequence() публичный Метод

Initializes the object.
public ModelParameterDateSequence ( string startDateExpression, string endDateExpression, string frequencyExpression ) : System
startDateExpression string The expression for the start date.
endDateExpression string The expression for the end date.
frequencyExpression string The expression for the frequency.
Результат System

Parse() публичный Метод

Parses the object.
public Parse ( IProject p_Context ) : bool
p_Context IProject The project in which to parse the object.
Результат bool

ParsePreview() публичный Метод

Parses the object for preview purposes.
public ParsePreview ( IProject p_Context, System.DateTime minDate, System.DateTime maxDate ) : bool
p_Context IProject The project in which to parse the object.
minDate System.DateTime The minimum date of the preview.
maxDate System.DateTime The maximum date of the preview.
Результат bool