GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoDocument Class / ValidCycle Property
In This Topic
    ValidCycle Property
    In This Topic
    Gets or sets whether a valid link can be made between two ports that may produce a directed or undirected cycle in this document.
    Syntax
    [Category("Behavior")]
    [DefaultValue(Mono.Cecil.CustomAttributeArgument)]
    [Description("Whether a valid link can produce a cycle in the graph.")]
    public virtual GoDocumentValidCycle ValidCycle {get; set;}

    Property Value

    This defaults to GoDocumentValidCycle.All, resulting in no checks for a new link possibly producing any kind of cycle or loop.
    Remarks
    IsValidLink uses this property in the following manners:
    GoDocumentValidCycle
    GoDocumentValidCycle.All produces no checking for cycles.
    GoDocumentValidCycle.NotDirected checks for possible cycle consisting of directed links. This check is slower and consumes more memory than the "Fast" version, but will not fail even if there are cycles or loops in the graph.
    GoDocumentValidCycle.NotDirectedFast checks for possible cycle consisting of directed links, without concern for any existing directed cycles elsewhere in the graph. Thus using this mode may result in infinite recursion and stack overflows if there happen to be any directed cycles accessible from either port in a call to IsValidLink.
    GoDocumentValidCycle.NotUndirected checks for possible cycle consisting of links in either direction.
    GoDocumentValidCycle.DestinationTree checks for possible links that would cause the graph no longer to be a tree, with each node having at most one source link.
    GoDocumentValidCycle.SourceTree checks for possible links that would cause the graph no longer to be a tree, with each node having at most one destination link.
    See Also