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

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

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