public override void Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification) { if (FloatValueSemanticsProvider.IsAdaptedType(type)) { var spec = reflector.LoadSpecification <IObjectSpecImmutable>(FloatValueSemanticsProvider.AdaptedType); AddValueFacets(new FloatValueSemanticsProvider(spec, specification), specification); } }
public override IImmutableDictionary <string, ITypeSpecBuilder> Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification, IImmutableDictionary <string, ITypeSpecBuilder> metamodel) { if (!FloatValueSemanticsProvider.IsAdaptedType(type)) { return(metamodel); } var(oSpec, mm) = reflector.LoadSpecification <IObjectSpecImmutable>(FloatValueSemanticsProvider.AdaptedType, metamodel); AddValueFacets(new FloatValueSemanticsProvider(oSpec, specification), specification); return(mm); }
public override ImmutableDictionary <string, ITypeSpecBuilder> Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification, ImmutableDictionary <string, ITypeSpecBuilder> metamodel) { if (FloatValueSemanticsProvider.IsAdaptedType(type)) { var result = reflector.LoadSpecification(FloatValueSemanticsProvider.AdaptedType, metamodel); metamodel = result.Item2; var spec = result.Item1 as IObjectSpecImmutable; AddValueFacets(new FloatValueSemanticsProvider(spec, specification), specification); } return(metamodel); }