Exemple #1
0
 /// <summary>
 /// Constructs a documented item.
 /// </summary>
 /// <param name="nsName">The name of the namespace that defines this item</param>
 /// <param name="itemName">The name of the item itself</param>
 /// <param name="kind">The item's kind: operation, function, or UDT</param>
 /// <param name="documentation">The source documentation for the item</param>
 internal DocItem(string nsName, string itemName, string kind, ImmutableArray <string> documentation)
 {
     namespaceName = nsName;
     name          = itemName;
     uid           = (namespaceName + "." + name).ToLowerInvariant();
     itemType      = kind;
     comments      = new DocComment(documentation);
 }
Exemple #2
0
        /// <summary>
        /// Constructs a documented item.
        /// </summary>
        /// <param name="nsName">The name of the namespace that defines this item</param>
        /// <param name="itemName">The name of the item itself</param>
        /// <param name="kind">The item's kind: operation, function, or UDT</param>
        /// <param name="documentation">The source documentation for the item</param>
        internal DocItem(string nsName, string itemName, string kind, ImmutableArray <string> documentation,
                         IEnumerable <QsDeclarationAttribute> attributes)
        {
            namespaceName = nsName;
            name          = itemName;
            uid           = (namespaceName + "." + name).ToLowerInvariant();
            itemType      = kind;
            var res = SymbolResolution.TryFindRedirect(attributes);

            deprecated  = res.IsValue;
            replacement = res.ValueOr("");
            comments    = new DocComment(documentation, name, deprecated, replacement);
        }