コード例 #1
0
        int ICompoundGraph <TVertex, TEdge> .GetChildrenCount(TVertex vertex)
        {
            ICompoundGraph <TVertex, TEdge> ithis = this;

            Contract.Requires(ithis.ContainsVertex(vertex));
            Contract.Ensures(Contract.Result <int>() >= 0);

            return(default(int));
        }
コード例 #2
0
        IEnumerable <TVertex> ICompoundGraph <TVertex, TEdge> .GetChildrenVertices(TVertex vertex)
        {
            ICompoundGraph <TVertex, TEdge> ithis = this;

            Contract.Requires(!vertex.Equals(default(TVertex)));
            Contract.Requires(ithis.ContainsVertex(vertex));

            return(new List <TVertex>());
        }
コード例 #3
0
        bool ICompoundGraph <TVertex, TEdge> .IsChildVertex(TVertex vertex)
        {
            ICompoundGraph <TVertex, TEdge> ithis = this;

            Contract.Requires(!vertex.Equals(default(TVertex)));
            Contract.Requires(ithis.ContainsVertex(vertex));

            return(default(bool));
        }
コード例 #4
0
        bool ICompoundGraph <TVertex, TEdge> .AddChildVertex(TVertex parent, TVertex child)
        {
            ICompoundGraph <TVertex, TEdge> ithis = this;

            Contract.Requires(!parent.Equals(default(TVertex)));
            Contract.Requires(ithis.ContainsVertex(parent));

            return(default(bool));
        }
コード例 #5
0
        int ICompoundGraph <TVertex, TEdge> .AddChildVertexRange(TVertex parent, IEnumerable <TVertex> children)
        {
            ICompoundGraph <TVertex, TEdge> ithis = this;

            Contract.Requires(!parent.Equals(default(TVertex)));
            Contract.Requires(ithis.ContainsVertex(parent));
            Contract.Ensures(Contract.Result <int>() >= 0);

            return(default(int));
        }
コード例 #6
0
        TVertex ICompoundGraph <TVertex, TEdge> .GetParent(TVertex vertex)
        {
            ICompoundGraph <TVertex, TEdge> ithis = this;

            Contract.Requires(!vertex.Equals(default(TVertex)));
            Contract.Requires(ithis.ContainsVertex(vertex));
            //TODO this is a bug in the MS Contract, i think -- solve it
            //Contract.Ensures( Contract.Result<TVertex>().Equals( default( TVertex ) ) || ithis.ContainsVertex( Contract.Result<TVertex>() ) );

            return(default(TVertex));
        }