AttributeUtils.AddToCallables Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| AddToCallables(QsCompilation, QsDeclarationAttribute[]) |
Adds the given attribute(s) to all callables in the given compilation. |
| AddToCallables(QsCompilation, ValueTuple<QsDeclarationAttribute,Func<QsCallable,Boolean>>[]) |
Adds the given attribute(s) to all callables in the given compilation that satisfy the given predicate
|
| AddToCallables(QsNamespace, QsDeclarationAttribute[]) |
Adds the given attribute(s) to all callables in the given namespace. |
| AddToCallables(QsNamespace, ValueTuple<QsDeclarationAttribute,Func<QsCallable,Boolean>>[]) |
Adds the given attribute(s) to all callables in the given namespace that satisfy the given predicate
|
| AddToCallables(QsCompilation, QsDeclarationAttribute, Func<QsCallable,Boolean>) |
Adds the given attribute to all callables in the given compilation that satisfy the given predicate
|
| AddToCallables(QsNamespace, QsDeclarationAttribute, Func<QsCallable,Boolean>) |
Adds the given attribute to all callables in the given namespace that satisfy the given predicate
|
AddToCallables(QsCompilation, QsDeclarationAttribute[])
Adds the given attribute(s) to all callables in the given compilation.
public static Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation AddToCallables (Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation, params Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute[] attributes);
static member AddToCallables : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation * Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute[] -> Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation
Public Shared Function AddToCallables (compilation As QsCompilation, ParamArray attributes As QsDeclarationAttribute()) As QsCompilation
Parameters
- compilation
- QsCompilation
- attributes
- QsDeclarationAttribute[]
Returns
Applies to
AddToCallables(QsCompilation, ValueTuple<QsDeclarationAttribute,Func<QsCallable,Boolean>>[])
Adds the given attribute(s) to all callables in the given compilation that satisfy the given predicate
- if the predicate is specified and not null.
public static Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation AddToCallables (Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation, params (Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute, Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable?,bool>)[] attributes);
static member AddToCallables : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation * ValueTuple<Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute, Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable, bool>>[] -> Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation
Public Shared Function AddToCallables (compilation As QsCompilation, ParamArray attributes As ValueTuple(Of QsDeclarationAttribute, Func(Of QsCallable, Boolean))()) As QsCompilation
Parameters
- compilation
- QsCompilation
- attributes
- ValueTuple<QsDeclarationAttribute,Func<QsCallable,Boolean>>[]
Returns
Applies to
AddToCallables(QsNamespace, QsDeclarationAttribute[])
Adds the given attribute(s) to all callables in the given namespace.
public static Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace AddToCallables (Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace ns, params Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute[] attributes);
static member AddToCallables : Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace * Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute[] -> Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace
Public Shared Function AddToCallables (ns As QsNamespace, ParamArray attributes As QsDeclarationAttribute()) As QsNamespace
Parameters
- ns
- QsNamespace
- attributes
- QsDeclarationAttribute[]
Returns
Applies to
AddToCallables(QsNamespace, ValueTuple<QsDeclarationAttribute,Func<QsCallable,Boolean>>[])
Adds the given attribute(s) to all callables in the given namespace that satisfy the given predicate
- if the predicate is specified and not null.
public static Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace AddToCallables (Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace ns, params (Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute, Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable?,bool>)[] attributes);
static member AddToCallables : Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace * ValueTuple<Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute, Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable, bool>>[] -> Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace
Public Shared Function AddToCallables (ns As QsNamespace, ParamArray attributes As ValueTuple(Of QsDeclarationAttribute, Func(Of QsCallable, Boolean))()) As QsNamespace
Parameters
- ns
- QsNamespace
- attributes
- ValueTuple<QsDeclarationAttribute,Func<QsCallable,Boolean>>[]
Returns
Applies to
AddToCallables(QsCompilation, QsDeclarationAttribute, Func<QsCallable,Boolean>)
Adds the given attribute to all callables in the given compilation that satisfy the given predicate
- if the predicate is specified and not null.
public static Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation AddToCallables (Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation, Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute attribute, Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable,bool>? predicate = default);
static member AddToCallables : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation * Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute * Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable, bool> -> Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation
Public Shared Function AddToCallables (compilation As QsCompilation, attribute As QsDeclarationAttribute, Optional predicate As Func(Of QsCallable, Boolean) = Nothing) As QsCompilation
Parameters
- compilation
- QsCompilation
- attribute
- QsDeclarationAttribute
- predicate
- Func<QsCallable,Boolean>
Returns
Applies to
AddToCallables(QsNamespace, QsDeclarationAttribute, Func<QsCallable,Boolean>)
Adds the given attribute to all callables in the given namespace that satisfy the given predicate
- if the predicate is specified and not null.
public static Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace AddToCallables (Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace ns, Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute attribute, Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable,bool>? predicate = default);
static member AddToCallables : Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace * Microsoft.Quantum.QsCompiler.SyntaxTree.QsDeclarationAttribute * Func<Microsoft.Quantum.QsCompiler.SyntaxTree.QsCallable, bool> -> Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace
Public Shared Function AddToCallables (ns As QsNamespace, attribute As QsDeclarationAttribute, Optional predicate As Func(Of QsCallable, Boolean) = Nothing) As QsNamespace
Parameters
- ns
- QsNamespace
- attribute
- QsDeclarationAttribute
- predicate
- Func<QsCallable,Boolean>