/// <inheritdoc /> public GatheringToolSkin Convert(DetailsDataContract value) { if (value == null) { throw new ArgumentNullException("value", "Precondition: value != null"); } IConverter <DetailsDataContract, GatheringToolSkin> converter; GatheringToolSkin skin; if (this.typeConverters.TryGetValue(value.Type, out converter)) { skin = converter.Convert(value); } else { Debug.Assert(false, "Unknown type discriminator: " + value.Type); skin = new UnknownGatheringToolSkin(); } return(skin); }
// Implement this method in a buddy class to set properties that are specific to 'UnknownGatheringToolSkin' (if any) partial void Merge(UnknownGatheringToolSkin entity, SkinDTO dto, object state);
/// <inheritdoc /> public GatheringToolSkin Convert(SkinDTO value, object state) { var entity = new UnknownGatheringToolSkin(); this.Merge(entity, value, state); return entity; }