public static BclClassProxy FromBclClass(IBclClass bclClass) { var formattedDateTime = bclClass as FormattedDateTime; if (formattedDateTime != null) { return new FormattedDateTimeProxy { TypeAlias = formattedDateTime.TypeAlias, TypeName = formattedDateTime.TypeName, Format = formattedDateTime.Format }; } var nullableFormattedDateTime = bclClass as NullableFormattedDateTime; if (nullableFormattedDateTime != null) { return new NullableFormattedDateTimeProxy { TypeAlias = nullableFormattedDateTime.TypeAlias, TypeName = nullableFormattedDateTime.TypeName, Format = nullableFormattedDateTime.Format }; } return new BclClassProxy { TypeAlias = bclClass.TypeAlias, TypeName = bclClass.TypeName }; }
public static BclClassProxy FromBclClass(IBclClass bclClass) { var formattedDateTime = bclClass as FormattedDateTime; if (formattedDateTime != null) { return(new FormattedDateTimeProxy { TypeAlias = formattedDateTime.TypeAlias, TypeName = formattedDateTime.TypeName, Format = formattedDateTime.Format }); } var nullableFormattedDateTime = bclClass as NullableFormattedDateTime; if (nullableFormattedDateTime != null) { return(new NullableFormattedDateTimeProxy { TypeAlias = nullableFormattedDateTime.TypeAlias, TypeName = nullableFormattedDateTime.TypeName, Format = nullableFormattedDateTime.Format }); } return(new BclClassProxy { TypeAlias = bclClass.TypeAlias, TypeName = bclClass.TypeName }); }