Beispiel #1
0
 public override void Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification)
 {
     if (DoubleValueSemanticsProvider.IsAdaptedType(type))
     {
         IObjectSpecBuilder spec = reflector.LoadSpecification(DoubleValueSemanticsProvider.AdaptedType);
         AddValueFacets(new DoubleValueSemanticsProvider(spec, specification), specification);
     }
 }
        public override IImmutableDictionary <string, ITypeSpecBuilder> Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification, IImmutableDictionary <string, ITypeSpecBuilder> metamodel)
        {
            if (!DoubleValueSemanticsProvider.IsAdaptedType(type))
            {
                return(metamodel);
            }

            var(oSpec, mm) = reflector.LoadSpecification <IObjectSpecImmutable>(DoubleValueSemanticsProvider.AdaptedType, metamodel);
            AddValueFacets(new DoubleValueSemanticsProvider(oSpec, specification), specification);
            return(mm);
        }
Beispiel #3
0
        public override IImmutableDictionary <string, ITypeSpecBuilder> Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification, IImmutableDictionary <string, ITypeSpecBuilder> metamodel)
        {
            if (DoubleValueSemanticsProvider.IsAdaptedType(type))
            {
                var result = reflector.LoadSpecification(DoubleValueSemanticsProvider.AdaptedType, metamodel);

                metamodel = result.Item2;
                var spec = result.Item1 as IObjectSpecImmutable;
                AddValueFacets(new DoubleValueSemanticsProvider(spec, specification), specification);
            }
            return(metamodel);
        }