コード例 #1
0
 public override void Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification)
 {
     if (ImageValueSemanticsProvider.IsAdaptedType(type))
     {
         var spec = reflector.LoadSpecification <IObjectSpecImmutable>(ImageValueSemanticsProvider.AdaptedType);
         AddValueFacets(new ImageValueSemanticsProvider(spec, specification), specification);
     }
 }
        public override IImmutableDictionary <string, ITypeSpecBuilder> Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification, IImmutableDictionary <string, ITypeSpecBuilder> metamodel)
        {
            if (!ImageValueSemanticsProvider.IsAdaptedType(type))
            {
                return(metamodel);
            }

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

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