TimeSpanMinutesOrInfiniteConverter.ConvertFrom 메서드

정의

StringTimeSpan로 변환합니다.

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ ctx, System::Globalization::CultureInfo ^ ci, System::Object ^ data);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (ctx As ITypeDescriptorContext, ci As CultureInfo, data As Object) As Object

매개 변수

ctx
ITypeDescriptorContext

형식 변환에 사용되는 ITypeDescriptorContext 개체입니다.

ci
CultureInfo

변환 중 사용되는 CultureInfo 개체입니다.

data
Object

변환할 String 개체입니다.

반환

TimeSpan.MaxValue는 매개 변수가 data "infinite"이면 이고, TimeSpan 그렇지 않으면 매개 변수를 분 단위로 data 나타내는 입니다 String .

예제

코드 예제를 참조 합니다 InfiniteTimeSpanConverterTimeSpanMinutesConverter 클래스입니다.

설명

시스템은 구성 파일에서 읽을 때 메서드를 사용하여 ConvertFrom 값을 TimeSpan로 변환하거나 "infinite"를 String 로 변환 String 합니다MaxValue.

적용 대상