AttributeUtils.AddToCallables Method

Definition

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

  • if the predicate is specified and not null.
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

  • if the predicate is specified and not null.
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.
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.

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

QsCompilation

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

Returns

QsCompilation

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

attributes
QsDeclarationAttribute[]

Returns

QsNamespace

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

Returns

QsNamespace

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
predicate
Func<QsCallable,Boolean>

Returns

QsCompilation

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

predicate
Func<QsCallable,Boolean>

Returns

QsNamespace

Applies to