Class CodeElement
Represents a code element, such as a class or interface, that is part of the implementation of a component.
[DataContract]
public sealed class CodeElement : IEquatable<CodeElement>
- Inheritance
-
CodeElement
- Implements
- Inherited Members
Constructors
CodeElement(string)
Creates a CodeElement based upon the fully qualified name provided.
public CodeElement(string fullyQualifiedTypeName)
Parameters
fullyQualifiedTypeNamestringA fully qualified type name
Fields
Name
The simple type name of the code element.
[DataMember(Name = "name", EmitDefaultValue = false)]
public readonly string Name
Field Value
Type
The fully qualified type name of the code element.
[DataMember(Name = "type", EmitDefaultValue = false)]
public readonly string Type
Field Value
Properties
Category
The category of code element; e.g. class, interface, etc.
[DataMember(Name = "category", EmitDefaultValue = false)]
public string Category { get; set; }
Property Value
Description
A short description of the code element's responsibility.
[DataMember(Name = "description", EmitDefaultValue = false)]
public string Description { get; set; }
Property Value
Language
The programming language used to create the code element.
[DataMember(Name = "language", EmitDefaultValue = false)]
public string Language { get; set; }
Property Value
Role
The role of the code element ... Primary or Supporting.
[DataMember(Name = "role", EmitDefaultValue = true)]
public CodeElementRole Role { get; }
Property Value
Size
The size of the code element; e.g. the number of lines.
[DataMember(Name = "size", EmitDefaultValue = true)]
public long Size { get; set; }
Property Value
Url
A URL; e.g. a reference to the code element in source code control.
[DataMember(Name = "url", EmitDefaultValue = false)]
public string Url { get; set; }
Property Value
Visibility
The visibility of the code element; e.g. public, package, private.
[DataMember(Name = "visibility", EmitDefaultValue = false)]
public string Visibility { get; set; }
Property Value
Methods
Equals(CodeElement)
Compares this code element with another code element by fully qualified type name.
public bool Equals(CodeElement other)
Parameters
otherCodeElementThe code element to compare with.
Returns
Equals(object)
Compares this code element with another object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with.
Returns
- bool
true when
objis a matching CodeElement; otherwise, false.
GetHashCode()
Returns a hash code derived from the fully qualified type name.
public override int GetHashCode()
Returns
- int
A hash code for the current code element.