Pegasus.Expressions.CodeSpan.CodeSpan C# (CSharp) Méthode

CodeSpan() public méthode

Initializes a new instance of the CodeSpan class.
public CodeSpan ( string code, Cursor start, Cursor end, string value = null ) : System
code string The string contents of the code span.
start Cursor The start of the code region.
end Cursor The end of the code region.
value string The value of the code span.
Résultat System
        public CodeSpan(string code, Cursor start, Cursor end, string value = null)
        {
            if (code == null)
            {
                throw new ArgumentNullException(nameof(code));
            }

            if (start == null)
            {
                throw new ArgumentNullException(nameof(start));
            }

            if (end == null)
            {
                throw new ArgumentNullException(nameof(end));
            }

            this.Code = code;
            this.Start = start;
            this.End = end;
            this.value = value ?? code;
        }