Summary
[Editor-Only] Manages the details for building a namespace in a procedural C# script.
- Assembly
- Weaver
.dll - Namespace
- Weaver
.Editor .Procedural .Scripting - Interfaces
- Base Types
-
- Object
- ElementBuilder
- Derived Types
graph BT
Type-->Base0["ElementBuilder"]
click Base0 "/weaver/api/Weaver.Editor.Procedural.Scripting/ElementBuilder"
Base0-->Base1["Object"]
Type-.->Interface0["IElementBuilderGroup"]
click Interface0 "/weaver/api/Weaver.Editor.Procedural.Scripting/IElementBuilderGroup"
Type["NamespaceBuilder"]
class Type type-node
Derived0["ScriptBuilder"]-->Type
click Derived0 "/weaver/api/Weaver.Editor.Procedural.Scripting/ScriptBuilder"
Syntax
public class NamespaceBuilder : ElementBuilder, IElementBuilderGroup
Fields
| Name | Constant Value | Summary |
|---|---|---|
| Default |
The default delegate to use to build the XML comment for this element.
Assigned using the return value of
Weaver.Editor.Procedural.Scripting.ElementBuilder.GetDefaultCommentBuilder.
Inherited from ElementBuilder
|
|
| Elements |
The members to build in this type, including
Weaver.Editor.Procedural.Scripting.TypeBuilders for any nested types.
|
Properties
| Name | Value | Summary |
|---|---|---|
| CommentBuilder | Action |
This delegate is used to append the XML comment for this element. By default it will simply append the
Weaver.Editor.Procedural.Scripting.ElementBuilder.NameSource.
Inherited from ElementBuilder
|
| Compilation |
int |
The index in
Weaver.Editor.Procedural.Scripting.ScriptBuilder.CompilationSymbols of the symbol in which this element will be declared, I.E. #if SYMBOL.
Inherited from ElementBuilder
|
| FullName | string |
Returns the full name of this element, including its
Weaver.Editor.Procedural.Scripting.ElementBuilder.Parent (and any types and namespaces it
is nested inside).
Inherited from ElementBuilder
|
| HasExistingMember | bool |
Returns true if this element is associated with an existing
System.Reflection.MemberInfo.
Inherited from ElementBuilder
|
| IsFallbackName | bool |
Indicates whether the current
Weaver.Editor.Procedural.Scripting.ElementBuilder.Name of this element is the primary name derived from the
Weaver.Editor.Procedural.Scripting.ElementBuilder.NameSource. A value of false means that there was a name conflict between this element and
another, and the Weaver.Editor.Procedural.Scripting.ElementBuilder.Name was re-derived using Weaver.Editor.Procedural.Scripting.ScriptBuilder.GetFallbackMemberName(System.String,System.String).
Inherited from ElementBuilder
|
| MemberType | MemberTypes |
Namespaces are not members, so this property returns
System.Reflection.MemberTypes.Custom. |
| Name | string |
The actual
Weaver.Editor.Procedural.Scripting.ElementBuilder.Name of this element.
This value is derived from Weaver.Editor.Procedural.Scripting.ElementBuilder.NameSource during Weaver.Editor.Procedural.Scripting.ElementBuilder.PrepareToBuild(System.Boolean,System.Boolean@).
Inherited from ElementBuilder
|
| NameSource | string |
The source string which will be used to determine the actual
Weaver.Editor.Procedural.Scripting.ElementBuilder.Name of this element.Inherited from ElementBuilder
|
| Namespace | string |
The name of the
Weaver.Editor.Procedural.Scripting.NamespaceBuilder containing this type (or null if there isn't one). |
| Parent | IElementBuilderGroup |
The builder of the type in which this element will be declared.
Inherited from ElementBuilder
|
| RegionIndex | int |
The index in
Weaver.Editor.Procedural.Scripting.ScriptBuilder.Regions of the region in which this element will be declared, I.E. #region Region Name.
Inherited from ElementBuilder
|
| ScriptBuilder | ScriptBuilder |
The
Weaver.Editor.Procedural.Scripting.ScriptBuilder in which this element is currently being used.
Inherited from ElementBuilder
|
Methods
| Name | Value | Summary |
|---|---|---|
| AddMember |
T |
Adds the specified `member` to the
Weaver.Editor.Procedural.Scripting.NamespaceBuilder.Elements list and returns it.
|
| AddNamespace |
NamespaceBuilder |
Get a
Weaver.Editor.Procedural.Scripting.ConstructorBuilder from the object pool and initialize it with the specified parameters as a
member of this namespace.
|
| AddType |
TypeBuilder |
Get a
Weaver.Editor.Procedural.Scripting.TypeBuilder from the object pool and initialize it with the specified parameters as a
member of this namespace.
|
| AddType |
TypeBuilder |
Get a
Weaver.Editor.Procedural.Scripting.TypeBuilder from the object pool and initialize it with the specified parameters as a
member of this namespace.
|
| AddType |
TypeBuilder |
Get a
Weaver.Editor.Procedural.Scripting.TypeBuilder from the object pool and initialize it with the specified parameters as a
member of this namespace.
|
| AppendDescription |
void |
Appends a description of this namespace and its
Weaver.Editor.Procedural.Scripting.NamespaceBuilder.Elements.
|
| AppendFullName |
void |
Appends the full name of this element, including its
Weaver.Editor.Procedural.Scripting.ElementBuilder.Parent (and any types and namespaces it
is nested inside).
Inherited from ElementBuilder
|
| AppendHeader |
void |
Appends a C# XML comment using the
Weaver.Editor.Procedural.Scripting.ElementBuilder.CommentBuilder.Inherited from ElementBuilder
|
| AppendScript |
void |
Appends the declaration of this namespace in C# code to the specified `text`.
|
| DetermineMemberName |
void |
Uses the specified
Weaver.Editor.Procedural.Scripting.ScriptBuilder.GetMemberName(System.String,System.String,System.Boolean@) to determine the Weaver.Editor.Procedural.Scripting.ElementBuilder.Name of this element.
Inherited from ElementBuilder
|
| Get |
NamespaceBuilder |
Get a
Weaver.Editor.Procedural.Scripting.NamespaceBuilder from the object pool and initialize it with the specified parameters.
static
|
| Get |
NamespaceBuilder |
Get a
Weaver.Editor.Procedural.Scripting.NamespaceBuilder from the object pool and initialize it with the specified parameters.
static
|
| Get |
Action |
Namespaces are not generally allowed to have comments.
|
| GetDescription |
string |
Gets a description of this element by calling
Weaver.Editor.Procedural.Scripting.ElementBuilder.ToString on it and any sub-members.
Inherited from ElementBuilder
|
| Initialize |
void |
Assigns the specified parameters to this element and determines the
Weaver.Editor.Procedural.Scripting.ElementBuilder.Name.
Inherited from ElementBuilder
|
| IsExistingMember |
bool |
Returns false because namespaces don't have any
System.Reflection.MemberInfo.
|
| PrepareForReuse |
void |
Reset this type and call
Weaver.Editor.Procedural.Scripting.ElementBuilder.ReleaseToPool on all its members so that it can be
reused without releasing this type itself to the pool.
|
| Release |
void |
Releases all elements currently in this namespace back to their respective pools.
|
| ReleaseToPool |
void |
Resets this element and adds it to its object pool to be reused later.
|
| Reset |
void |
Resets all of the fields and properties of this element to their default values.
|
| SetName |
void |
Sets the
Weaver.Editor.Procedural.Scripting.ElementBuilder.Name and Weaver.Editor.Procedural.Scripting.ElementBuilder.NameSource.Inherited from ElementBuilder
|
| ToString |
string |
Returns a summary of this element including its type,
Weaver.Editor.Procedural.Scripting.ElementBuilder.NameSource, Weaver.Editor.Procedural.Scripting.ElementBuilder.Name, and Weaver.Editor.Procedural.Scripting.ElementBuilder.FullName.
Inherited from ElementBuilder
|