internal static CustomFieldBuilder CustomField( Silanis.ESL.API.CustomField apiCustomField ) { CustomFieldBuilder result = new CustomFieldBuilder(); result.WithId( apiCustomField.Id ) .WithDefaultValue( apiCustomField.Value ); foreach ( Silanis.ESL.API.Translation tran in apiCustomField.Translations ) { result.WithTranslation( TranslationBuilder.NewTranslation( tran ) ); } return result; }
internal static CustomFieldBuilder CustomField(Silanis.ESL.API.CustomField apiCustomField) { CustomFieldBuilder result = new CustomFieldBuilder(); result.WithId(apiCustomField.Id) .WithDefaultValue(apiCustomField.Value); foreach (Silanis.ESL.API.Translation tran in apiCustomField.Translations) { result.WithTranslation(TranslationBuilder.NewTranslation(tran)); } return(result); }
public Silanis.ESL.SDK.CustomField ToSDKCustomField() { if (apiCustomField == null) { return sdkCustomField; } CustomFieldBuilder result = new CustomFieldBuilder(); result.WithId(apiCustomField.Id) .WithDefaultValue(apiCustomField.Value) .IsRequired(apiCustomField.Required.Value); foreach(Silanis.ESL.API.Translation translation in apiCustomField.Translations) { result.WithTranslation(TranslationBuilder.NewTranslation(translation)); } return result.Build(); }