Esempio n. 1
0
        SnappedPrimitive IPrimitiveSnapper.Create(NewPrimitive newPrimitive)
        {
            Contract.Requires(newPrimitive != null);
            Contract.Requires(NewPrimitiveType.IsAssignableFrom(newPrimitive.GetType()));

            Contract.Ensures(Contract.Result <SnappedPrimitive>() != null);
            Contract.Ensures(SnappedPrimitiveType.IsAssignableFrom(Contract.Result <SnappedPrimitive>().GetType()));

            return(null);
        }
Esempio n. 2
0
        SnappedPrimitive IPrimitiveSnapper.Create(PointsSequence[] selectedCurves, NewPrimitive newPrimitive)
        {
            Contract.Requires(selectedCurves != null);
            Contract.Requires(Contract.ForAll(selectedCurves, c => c != null));
            Contract.Requires(newPrimitive != null);
            Contract.Requires(NewPrimitiveType.IsAssignableFrom(newPrimitive.GetType()));

            Contract.Ensures(Contract.Result <SnappedPrimitive>() != null);
            Contract.Ensures(SnappedPrimitiveType.IsAssignableFrom(Contract.Result <SnappedPrimitive>().GetType()));

            return(null);
        }
Esempio n. 3
0
        Tuple <Term, Term[]> IPrimitiveSnapper.Reconstruct(SnappedPrimitive snappedPrimitive, Dictionary <FeatureCurve, ISet <Annotation> > curvesToAnnotations)
        {
            Contract.Requires(snappedPrimitive != null);
            Contract.Requires(SnappedPrimitiveType.IsAssignableFrom(snappedPrimitive.GetType()));
            Contract.Requires(curvesToAnnotations != null);
            Contract.Requires(Contract.ForAll(curvesToAnnotations, pair => pair.Value != null));

            Contract.Ensures(Contract.Result <Tuple <Term, Term[]> >() != null);
            Contract.Ensures(Contract.Result <Tuple <Term, Term[]> >().Item1 != null);
            Contract.Ensures(Contract.Result <Tuple <Term, Term[]> >().Item2 != null);
            Contract.Ensures(Contract.ForAll(Contract.Result <Tuple <Term, Term[]> >().Item2, constraint => constraint != null));
            return(null);
        }