示例#1
0
 /// <summary>
 /// Helper extension method to get <see cref="ConversionMetadataKeys.WhitePoint" />
 /// </summary>
 public static XYZColor GetWhitePointRequired(this IConversionMetadata node)
 => node.GetWhitePoint() ?? throw new MissingConversionMetadataException("White point is not specified, but is required for the conversion.", ConversionMetadataKeys.WhitePoint);
示例#2
0
 /// <summary>
 /// Helper extension method to get <see cref="ConversionMetadataKeys.WhitePoint" /> as Key-Value pair.
 /// </summary>
 public static KeyValuePair <string, object> GetWhitePointItem(this IConversionMetadata node)
 => new KeyValuePair <string, object>(ConversionMetadataKeys.WhitePoint, node.GetWhitePoint());
示例#3
0
 public FluentFromTo(IConverterAbstractFactory converterAbstractFactory, IConversionMetadata sourceMetadata, IConversionMetadata targetMetadata)
 {
     _converterAbstractFactory = converterAbstractFactory ?? throw new ArgumentNullException(nameof(converterAbstractFactory));
     _sourceMetadata           = sourceMetadata ?? throw new ArgumentNullException(nameof(sourceMetadata));
     _targetMetadata           = targetMetadata ?? throw new ArgumentNullException(nameof(targetMetadata));
 }
示例#4
0
 /// <summary>
 /// Helper extension method to get <see cref="ConversionMetadataKeys.WhitePoint" />
 /// </summary>
 public static XYZColor?GetWhitePoint(this IConversionMetadata node)
 => node.GetItemOrDefault <XYZColor?>(ConversionMetadataKeys.WhitePoint);
示例#5
0
 public IFluentConverterBuilderFromTo <TSource, TTarget> To <TTarget>(IConversionMetadata targetMetadata) where TTarget : IColorSpace
 => new FluentFromTo <TSource, TTarget>(_converterAbstractFactory, _sourceMetadata, targetMetadata ?? throw new ArgumentNullException(nameof(targetMetadata)));