public override void Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification) { if (ArrayValueSemanticsProvider <T> .IsAdaptedType(type)) { var spec = reflector.LoadSpecification <IObjectSpecImmutable>(ArrayValueSemanticsProvider <T> .AdaptedType); AddValueFacets(new ArrayValueSemanticsProvider <T>(spec, specification), specification); } }
public override void SetUp() { base.SetUp(); byteArray = new byte[0]; CreateAdapter(byteArray); specification = new Mock <ISpecification>().Object; IObjectSpecImmutable spec = new Mock <IObjectSpecImmutable>().Object; SetValue(value = new ArrayValueSemanticsProvider <byte>(spec, specification)); }
public override ImmutableDictionary<string, ITypeSpecBuilder> Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification, ImmutableDictionary<string, ITypeSpecBuilder> metamodel) { if (ArrayValueSemanticsProvider<T>.IsAdaptedType(type)) { var result = reflector.LoadSpecification(ArrayValueSemanticsProvider<T>.AdaptedType, metamodel); metamodel = result.Item2; var spec = result.Item1 as IObjectSpecImmutable; AddValueFacets(new ArrayValueSemanticsProvider<T>(spec, specification), specification); } return metamodel; }
public override IImmutableDictionary <string, ITypeSpecBuilder> Process(IReflector reflector, Type type, IMethodRemover methodRemover, ISpecificationBuilder specification, IImmutableDictionary <string, ITypeSpecBuilder> metamodel) { if (!ArrayValueSemanticsProvider <T> .IsAdaptedType(type)) { return(metamodel); } var(oSpec, mm) = reflector.LoadSpecification <IObjectSpecImmutable>(ArrayValueSemanticsProvider <T> .AdaptedType, metamodel); AddValueFacets(new ArrayValueSemanticsProvider <T>(oSpec, specification), specification); return(mm); }