/// <summary> /// Returns a DynamoDBEntryConversion corresponding to the ConversionSchema. /// The returned conversion is immutable. The conversion must be cloned /// before it can be modified. /// </summary> /// <param name="schema">Conversion to return.</param> /// <returns>DynamoDBEntryConversion corresponding to the ConversionSchema.</returns> internal static DynamoDBEntryConversion GetConversion(ConversionSchema schema) { switch (schema) { case ConversionSchema.V1: return(DynamoDBEntryConversion.V1); case ConversionSchema.V2: return(DynamoDBEntryConversion.V2); default: throw new ArgumentOutOfRangeException("schema"); } }
private DynamoDBEntryConversion(ConversionSchema schema, bool isImmutable) { OriginalConversion = schema; switch (schema) { case ConversionSchema.V1: SetV1Converters(); break; case ConversionSchema.V2: SetV2Converters(); break; default: throw new ArgumentOutOfRangeException("schema"); } IsImmutable = isImmutable; }